1800 |
How can I highlight somehow the child bars of a summary bar
Dim hSummary as N Dim hTask as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.Bars.Item("Task").Color = 15790320 var_Items = oG2antt.Items hSummary = var_Items.AddItem("Summary") var_Items.AddBar(hSummary,"Project Summary",{01/02/2001},{01/02/2001},"") hTask = var_Items.InsertItem(hSummary,,"Task A") var_Items.AddBar(hTask,"Task",{01/02/2001},{01/05/2001},"K1") hTask = var_Items.InsertItem(hSummary,,"Task B") var_Items.AddBar(hTask,"Task",{01/04/2001},{01/08/2001},"K2") hTask = var_Items.InsertItem(hSummary,,"Task C") var_Items.AddBar(hTask,"Task",{01/06/2001},{01/10/2001},"K3") ' var_Items.ExpandItem(hSummary) = .t. oG2antt.TemplateDef = "dim var_Items,hSummary" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = hSummary oG2antt.Template = "var_Items.ExpandItem(hSummary) = True" var_Items.DefineSummaryBars(hSummary,"",-1,"<*>") ' var_Items.ItemBar(hSummary,"",34) = 65536 oG2antt.TemplateDef = "dim var_Items,hSummary" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = hSummary oG2antt.Template = "var_Items.ItemBar(hSummary,``,34) = 65536" ' var_Items.ItemBar(hSummary,"",35) = 50 oG2antt.TemplateDef = "dim var_Items,hSummary" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = hSummary oG2antt.Template = "var_Items.ItemBar(hSummary,``,35) = 50" oG2antt.EndUpdate() |
1799 |
How do I change the color for the selected bars, without showing the frame arround
Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2002} var_Chart.SelBarColor = 2130706687 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 48" oG2antt.Columns.Add("Task") var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/02/2002},{01/04/2002},"A") var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/06/2002},{01/10/2002},"B") var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{01/11/2002},{01/14/2002},"C") ' var_Items.ItemBar(0,"<A B>",257) = .t. oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ItemBar(0,`<A B>`,257) = True" oG2antt.EndUpdate() |
1798 |
Is it possible to enumerate the activities/bars of critical path
' Occurs when a bar is moved or resized. function BarResize as v (Item as OLE::Exontrol.G2antt.1::HITEM,Key as A) oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Items.SchedulePDM(Item,Key) end function Dim h1 as N Dim h2 as N Dim h3 as N Dim h4 as N Dim hSummary1 as N Dim oG2antt as P Dim var_Bars as local Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.LevelCount = 2 var_Chart.FirstVisibleDate = {01/01/2001} ' var_Chart.PaneWidth(.f.) = 96 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 96" ' var_Chart.Bars.Item("Task").Def(3) = "<%=int(%269) > 0 ? (`<b>` + %269 + `</b>`) : ``%>" var_Bars = var_Chart.Bars.Item("Task") oG2antt.TemplateDef = "dim var_Bars" oG2antt.TemplateDef = var_Bars oG2antt.Template = "var_Bars.Def(3) = `<%=int(%269) > 0 ? (``<b>`` + %269 + ``</b>``) : ````%>`" var_Items = oG2antt.Items hSummary1 = var_Items.AddItem("Summary") ' var_Items.ItemBold(hSummary1) = .t. oG2antt.TemplateDef = "dim var_Items,hSummary1" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = hSummary1 oG2antt.Template = "var_Items.ItemBold(hSummary1) = True" var_Items.AddBar(hSummary1,"Summary",{01/02/2001},{01/02/2001},"sum") h1 = var_Items.AddItem("Task 1") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001}) var_Items.DefineSummaryBars(hSummary1,"sum",h1,"") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/02/2001},{01/04/2001}) var_Items.DefineSummaryBars(hSummary1,"sum",h2,"") var_Items.AddLink("L1",h1,"",h2,"") h3 = var_Items.AddItem("Task 3") var_Items.AddBar(h3,"Task",{01/02/2001},{01/04/2001}) var_Items.DefineSummaryBars(hSummary1,"sum",h3,"") var_Items.AddLink("L2",h2,"",h3,"") h4 = var_Items.AddItem("Task 4") var_Items.AddBar(h4,"Task",{01/02/2001},{01/04/2001}) var_Items.DefineSummaryBars(hSummary1,"sum",h4,"") var_Items.AddLink("L3",h1,"",h4,"") ' var_Items.DefSchedulePDM(5) = 65280 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.DefSchedulePDM(5) = 65280" var_Items.SchedulePDM(h1,"") oG2antt.EndUpdate() |
1797 |
How can I add a SF link
Dim h1 as N Dim h2 as N Dim h3 as N Dim h4 as N Dim h5 as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {12/25/2000} ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Chart.LevelCount = 2 var_Items = oG2antt.Items h1 = var_Items.AddItem("Task 1") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/02/2001},{01/05/2001},"K2") h3 = var_Items.AddItem("Task 3") var_Items.AddBar(h3,"Task",{01/02/2001},{01/05/2001},"K3") h4 = var_Items.AddItem("Task 4") var_Items.AddBar(h4,"Task",{01/02/2001},{01/05/2001},"K4") h5 = var_Items.AddItem("Task 5") var_Items.AddBar(h5,"Task",{01/02/2001},{01/05/2001},"K5") var_Items.AddLink("L1",h1,"K1",h2,"K2") var_Items.AddLink("L2",h2,"K2",h3,"K3") var_Items.AddLink("L3",h3,"K3",h4,"K4") var_Items.AddLink("L4",h4,"K4",h5,"K5") ' var_Items.Link("L4",6) = 0 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`L4`,6) = 0" ' var_Items.Link("L4",7) = 2 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`L4`,7) = 2" ' var_Items.Link("L4",8) = 65280 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`L4`,8) = 65280" var_Items.SchedulePDM(0,"K5") oG2antt.Chart.ShowLinks = 1 oG2antt.EndUpdate() |
1796 |
How do I get the Start and End date of a bar
Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") oG2antt.Debug = .t. var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {09/20/2006} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 96 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 96" var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{09/21/2006},{09/24/2006},"K1") var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{09/22/2006},{09/25/2006},"K2") var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{09/23/2006},{09/26/2006},"K3") h = var_Items.ItemByIndex(1) ' var_Items.ItemBold(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBold(h) = True" ? "Start of " ? var_Items.FirstItemBar(h) ? var_Items.ItemBar(h,var_Items.FirstItemBar(h),1) ? "End of " ? var_Items.FirstItemBar(h) ? var_Items.ItemBar(h,var_Items.FirstItemBar(h),2) oG2antt.EndUpdate() |
1795 |
I haven't found options to change/localize (in German, or my current regional settings) the captions/text/strings ( dates, tooltip ) that shows in the chart area (method 2)
Dim oG2antt as P Dim var_Chart as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Chart = oG2antt.Chart var_Chart.FirstWeekDay = var_Chart.LocFirstWeekDay var_Chart.MonthNames = var_Chart.LocMonthNames var_Chart.WeekDays = var_Chart.LocWeekDays var_Chart.AMPM = var_Chart.LocAMPM var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 0 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 0" var_Chart.UnitScale = 4096 |
1794 |
Is it possible to change caption of the print and print preview, as it just says "Untitled Document", but I cant find the code that writes this caption
Dim h1 as N Dim h2 as N Dim oG2antt as P Dim var_Items as P Dim var_Print as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Task") oG2antt.Chart.FirstVisibleDate = {01/01/2001} var_Items = oG2antt.Items h1 = var_Items.AddItem("Task 1") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/05/2001},{01/07/2001},"K2") var_Items.AddLink("L1",h1,"K1",h2,"K2") oG2antt.EndUpdate() var_Print = OLE.Create("Exontrol.Print") var_Print.Caption = "This is your new caption for print and print preview" var_Print.AutoRelease = .f. var_Print.PrintExt = oG2antt var_Print.Preview() |
1793 |
Is it possible to specify the A4 paper size for the print preview
Dim h1 as N Dim h2 as N Dim oG2antt as P Dim var_Items as P Dim var_Print as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Task") oG2antt.Chart.FirstVisibleDate = {01/01/2001} var_Items = oG2antt.Items h1 = var_Items.AddItem("Task 1") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/05/2001},{01/07/2001},"K2") var_Items.AddLink("L1",h1,"K1",h2,"K2") oG2antt.EndUpdate() var_Print = OLE.Create("Exontrol.Print") ' var_Print.Settings(0) = 9 oG2antt.TemplateDef = "dim var_Print" oG2antt.TemplateDef = var_Print oG2antt.Template = "var_Print.Settings(0) = 9" var_Print.AutoRelease = .f. var_Print.PrintExt = oG2antt var_Print.Preview() |
1792 |
Is it possible to tell the print preview to open up in "landscape mode" by default, not in "portrait mode"
Dim h1 as N Dim h2 as N Dim oG2antt as P Dim var_Items as P Dim var_Print as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Task") oG2antt.Chart.FirstVisibleDate = {01/01/2001} var_Items = oG2antt.Items h1 = var_Items.AddItem("Task 1") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/05/2001},{01/07/2001},"K2") var_Items.AddLink("L1",h1,"K1",h2,"K2") oG2antt.EndUpdate() var_Print = OLE.Create("Exontrol.Print") var_Print.PageOrientation = 2 var_Print.AutoRelease = .f. var_Print.PrintExt = oG2antt var_Print.Preview() |
1791 |
How do I prevent a caption outside the bar from overlapping other bars
Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.ScrollBySingleLine = .t. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Chart.Bars.Copy("Task","Default-Task") var_Chart.Bars.Item("Task").OverlaidType = 4611 'exOverlaidBarsIncludeCaption + exOverlaidBarsStackAutoArrange + exOverlaidBarsStack var_Items = oG2antt.Items h = var_Items.AddItem("Task 1") var_Items.AddBar(h,"Task",{01/02/2001},{01/04/2001},"A1","task") ' var_Items.ItemBar(h,"A1",4) = 18 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`A1`,4) = 18" var_Items.AddBar(h,"Task",{01/06/2001},{01/10/2001},"A2","task") ' var_Items.ItemBar(h,"A2",4) = 16 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`A2`,4) = 16" h = var_Items.AddItem("Task 2") var_Items.AddBar(h,"Default-Task",{01/02/2001},{01/04/2001},"A1","task") ' var_Items.ItemBar(h,"A1",4) = 18 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`A1`,4) = 18" var_Items.AddBar(h,"Default-Task",{01/06/2001},{01/10/2001},"A2","task") ' var_Items.ItemBar(h,"A2",4) = 16 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`A2`,4) = 16" oG2antt.EndUpdate() |
1790 |
How do I clip/hide/align the bar's extra-caption/text based on the bar's size/width/length
Dim h as N Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Clip") oG2antt.ScrollBySingleLine = .t. oG2antt.DrawGridLines = -2 var_Chart = oG2antt.Chart var_Chart.AllowResizeChart = 6 'exAllowResizeChartMiddle + exAllowResizeChartHeader var_Chart.DrawGridLines = -2 var_Chart.FirstVisibleDate = {12/23/2000} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 216 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 216" var_Bar = var_Chart.Bars.Item("Task") var_Bar.Pattern = 32 var_Bar.Color = 10790052 var_Bar.StartColor = 15790320 var_Bar.EndColor = var_Bar.StartColor var_Bar.OverlaidType = 4611 'exOverlaidBarsIncludeCaption + exOverlaidBarsStackAutoArrange + exOverlaidBarsStack var_Bar.Height = 15 var_Chart.MinUnitWidth = var_Chart.UnitWidth var_Items = oG2antt.Items h = var_Items.AddItem("no clip, (0-2)") var_Items.AddBar(h,"Task",{01/02/2001},{01/04/2001},"K1") ' var_Items.ItemBar(h,"K1",44) = "no clip, right(<b>2</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,44) = `no clip, right(<b>2</b>)`" ' var_Items.ItemBar(h,"K1",45) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,45) = 2" var_Items.AddBar(h,"Task",{01/02/2001},{01/04/2001},"K2") ' var_Items.ItemBar(h,"K2",44) = "no clip, center(<b>1</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,44) = `no clip, center(<b>1</b>)`" ' var_Items.ItemBar(h,"K2",45) = 1 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,45) = 1" var_Items.AddBar(h,"Task",{01/02/2001},{01/04/2001},"K3","") ' var_Items.ItemBar(h,"K3",44) = "no clip, left(<b>0</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,44) = `no clip, left(<b>0</b>)`" ' var_Items.ItemBar(h,"K3",45) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,45) = 0" h = var_Items.AddItem("clip, inside (3-5)") var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K1") ' var_Items.ItemBar(h,"K1",44) = "clip, inside, right(<b>5</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,44) = `clip, inside, right(<b>5</b>)`" ' var_Items.ItemBar(h,"K1",45) = 5 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,45) = 5" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K2") ' var_Items.ItemBar(h,"K2",44) = "clip, inside, center(<b>4</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,44) = `clip, inside, center(<b>4</b>)`" ' var_Items.ItemBar(h,"K2",45) = 4 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,45) = 4" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K3") ' var_Items.ItemBar(h,"K3",44) = "clip, inside, left(<b>3</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,44) = `clip, inside, left(<b>3</b>)`" ' var_Items.ItemBar(h,"K3",45) = 3 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,45) = 3" h = var_Items.AddItem("hide on min width, clip if not fit, inside (6-8)") var_Items.AddBar(h,"Task",{12/26/2000},{01/10/2001},"K1") ' var_Items.ItemBar(h,"K1",44) = "hide on min width, clip if not fit, inside, right(<b>8</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,44) = `hide on min width, clip if not fit, inside, right(<b>8</b>)`" ' var_Items.ItemBar(h,"K1",45) = 8 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,45) = 8" var_Items.AddBar(h,"Task",{12/26/2000},{01/10/2001},"K2") ' var_Items.ItemBar(h,"K2",44) = "hide on min width, clip if not fit, inside, center(<b>7</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,44) = `hide on min width, clip if not fit, inside, center(<b>7</b>)`" ' var_Items.ItemBar(h,"K2",45) = 7 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,45) = 7" var_Items.AddBar(h,"Task",{12/26/2000},{01/10/2001},"K3") ' var_Items.ItemBar(h,"K3",44) = "hide on min width, clip if not fit, inside, left(<b>6</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,44) = `hide on min width, clip if not fit, inside, left(<b>6</b>)`" ' var_Items.ItemBar(h,"K3",45) = 6 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,45) = 6" h = var_Items.AddItem("hide if not fit, no clip, inside (9-11)") var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K1") ' var_Items.ItemBar(h,"K1",44) = "hide if not fit, no clip, inside, right(<b>11</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,44) = `hide if not fit, no clip, inside, right(<b>11</b>)`" ' var_Items.ItemBar(h,"K1",45) = 11 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,45) = 11" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K2") ' var_Items.ItemBar(h,"K2",44) = "hide if not fit, no clip, center(<b>10</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,44) = `hide if not fit, no clip, center(<b>10</b>)`" ' var_Items.ItemBar(h,"K2",45) = 10 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,45) = 10" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K3") ' var_Items.ItemBar(h,"K3",44) = "hide if not fit, no clip, inside, left(<b>9</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,44) = `hide if not fit, no clip, inside, left(<b>9</b>)`" ' var_Items.ItemBar(h,"K3",45) = 9 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,45) = 9" h = var_Items.AddItem("no clip, inside, outside (12-14)") var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K1") ' var_Items.ItemBar(h,"K1",44) = "no clip, inside, outside, right(<b>14</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,44) = `no clip, inside, outside, right(<b>14</b>)`" ' var_Items.ItemBar(h,"K1",45) = 14 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,45) = 14" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K2") ' var_Items.ItemBar(h,"K2",44) = "no clip, inside, outside, center(<b>13</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,44) = `no clip, inside, outside, center(<b>13</b>)`" ' var_Items.ItemBar(h,"K2",45) = 13 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,45) = 13" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K3") ' var_Items.ItemBar(h,"K3",44) = "no clip, inside, outside, left(<b>12</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,44) = `no clip, inside, outside, left(<b>12</b>)`" ' var_Items.ItemBar(h,"K3",45) = 12 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,45) = 12" h = var_Items.AddItem("no clip, outside (16-18)") var_Items.AddBar(h,"Task",{12/30/2000},{01/06/2001},"K1") ' var_Items.ItemBar(h,"K1",44) = "no clip, outside, right(<b>18</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,44) = `no clip, outside, right(<b>18</b>)`" ' var_Items.ItemBar(h,"K1",45) = 18 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,45) = 18" var_Items.AddBar(h,"Task",{12/30/2000},{01/06/2001},"K2") ' var_Items.ItemBar(h,"K2",44) = "no clip, outside, center(<b>17</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,44) = `no clip, outside, center(<b>17</b>)`" ' var_Items.ItemBar(h,"K2",45) = 17 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,45) = 17" var_Items.AddBar(h,"Task",{12/30/2000},{01/06/2001},"K3") ' var_Items.ItemBar(h,"K3",44) = "no clip, outside, left(<b>16</b>)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,44) = `no clip, outside, left(<b>16</b>)`" ' var_Items.ItemBar(h,"K3",45) = 16 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,45) = 16" oG2antt.EndUpdate() |
1789 |
What options do I have to show the links between bars (rectangular SEV, starts vertically, ends vertically)
Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.AntiAliasing = .t. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.NonworkingDays = 0 var_Chart.LinksWidth = 2 var_Items = oG2antt.Items var_Items.AddItem("") h3 = var_Items.AddItem("Task 3") var_Items.AddItem("") var_Items.AddBar(h3,"Task",{01/13/2001},{01/15/2001},"K3") h1 = var_Items.AddItem("Task 1") var_Items.AddItem("") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/07/2001},{01/09/2001},"K2") var_Items.AddItem("") var_Items.AddLink("L1",h1,"K1",h2,"K2") var_Items.AddLink("L2",h2,"K2",h3,"K3") ' var_Items.Link("<*>",15) = 5 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`<*>`,15) = 5" oG2antt.EndUpdate() |
1788 |
What options do I have to show the links between bars (rectangular SV, starts vertically, ends horizontally)
Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.AntiAliasing = .t. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.NonworkingDays = 0 var_Chart.LinksWidth = 2 var_Items = oG2antt.Items var_Items.AddItem("") h3 = var_Items.AddItem("Task 3") var_Items.AddItem("") var_Items.AddBar(h3,"Task",{01/13/2001},{01/15/2001},"K3") h1 = var_Items.AddItem("Task 1") var_Items.AddItem("") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/07/2001},{01/09/2001},"K2") var_Items.AddItem("") var_Items.AddLink("L1",h1,"K1",h2,"K2") var_Items.AddLink("L2",h2,"K2",h3,"K3") ' var_Items.Link("<*>",15) = 4 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`<*>`,15) = 4" oG2antt.EndUpdate() |
1787 |
What options do I have to show the links between bars (rectangular EV, starts horizontally, ends vertically)
Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.AntiAliasing = .t. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.NonworkingDays = 0 var_Chart.LinksWidth = 2 var_Items = oG2antt.Items var_Items.AddItem("") h3 = var_Items.AddItem("Task 3") var_Items.AddItem("") var_Items.AddBar(h3,"Task",{01/13/2001},{01/15/2001},"K3") h1 = var_Items.AddItem("Task 1") var_Items.AddItem("") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/07/2001},{01/09/2001},"K2") var_Items.AddItem("") var_Items.AddLink("L1",h1,"K1",h2,"K2") var_Items.AddLink("L2",h2,"K2",h3,"K3") ' var_Items.Link("<*>",15) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`<*>`,15) = 3" oG2antt.EndUpdate() |
1786 |
What options do I have to show the links between bars (straight)
Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.AntiAliasing = .t. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.NonworkingDays = 0 var_Chart.LinksWidth = 2 var_Items = oG2antt.Items var_Items.AddItem("") h3 = var_Items.AddItem("Task 3") var_Items.AddItem("") var_Items.AddBar(h3,"Task",{01/13/2001},{01/15/2001},"K3") h1 = var_Items.AddItem("Task 1") var_Items.AddItem("") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/07/2001},{01/09/2001},"K2") var_Items.AddItem("") var_Items.AddLink("L1",h1,"K1",h2,"K2") var_Items.AddLink("L2",h2,"K2",h3,"K3") ' var_Items.Link("<*>",15) = 2 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`<*>`,15) = 2" oG2antt.EndUpdate() |
1785 |
What options do I have to show the links between bars (direct)
Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.AntiAliasing = .t. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.NonworkingDays = 0 var_Chart.LinksWidth = 2 var_Items = oG2antt.Items var_Items.AddItem("") h3 = var_Items.AddItem("Task 3") var_Items.AddItem("") var_Items.AddBar(h3,"Task",{01/13/2001},{01/15/2001},"K3") h1 = var_Items.AddItem("Task 1") var_Items.AddItem("") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/07/2001},{01/09/2001},"K2") var_Items.AddItem("") var_Items.AddLink("L1",h1,"K1",h2,"K2") var_Items.AddLink("L2",h2,"K2",h3,"K3") ' var_Items.Link("<*>",15) = 1 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`<*>`,15) = 1" oG2antt.EndUpdate() |
1784 |
What options do I have to show the links between bars (round)
Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.AntiAliasing = .t. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.NonworkingDays = 0 var_Chart.LinksWidth = 2 var_Items = oG2antt.Items var_Items.AddItem("") h3 = var_Items.AddItem("Task 3") var_Items.AddItem("") var_Items.AddBar(h3,"Task",{01/13/2001},{01/15/2001},"K3") h1 = var_Items.AddItem("Task 1") var_Items.AddItem("") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/07/2001},{01/09/2001},"K2") var_Items.AddItem("") var_Items.AddLink("L1",h1,"K1",h2,"K2") var_Items.AddLink("L2",h2,"K2",h3,"K3") ' var_Items.Link("<*>",15) = -1 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`<*>`,15) = -1" oG2antt.EndUpdate() |
1783 |
What options do I have to show the links between bars (rectangular, default)
Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.AntiAliasing = .t. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.NonworkingDays = 0 var_Chart.LinksWidth = 2 var_Items = oG2antt.Items var_Items.AddItem("") h3 = var_Items.AddItem("Task 3") var_Items.AddItem("") var_Items.AddBar(h3,"Task",{01/13/2001},{01/15/2001},"K3") h1 = var_Items.AddItem("Task 1") var_Items.AddItem("") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/07/2001},{01/09/2001},"K2") var_Items.AddItem("") var_Items.AddLink("L1",h1,"K1",h2,"K2") var_Items.AddLink("L2",h2,"K2",h3,"K3") ' var_Items.Link("<*>",15) = 0 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`<*>`,15) = 0" oG2antt.EndUpdate() |
1782 |
I have a question about whether the control has the functionality to add two bars on the same item, as one would correspond to the item bar and another bar their progress, but progress is required to show dividedly at different times outside the activity bar item
Dim h as N Dim oG2antt as P Dim var_Bar as P Dim var_Bar1 as P Dim var_Bar2 as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") oG2antt.BackColorLevelHeader = oG2antt.BackColor var_Chart = oG2antt.Chart var_Chart.LevelCount = 2 var_Chart.FirstVisibleDate = {09/20/2006} ' var_Chart.PaneWidth(.f.) = 64 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 64" var_Bar = var_Chart.Bars.Copy("Progress","TProgressD") ' var_Bar.Def(4) = 18 oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(4) = 18" var_Bar.Shape = 20 var_Bar1 = var_Chart.Bars.Copy("Progress","TProgressC") ' var_Bar1.Def(4) = 18 oG2antt.TemplateDef = "dim var_Bar1" oG2antt.TemplateDef = var_Bar1 oG2antt.Template = "var_Bar1.Def(4) = 18" var_Bar2 = var_Chart.Bars.Copy("Progress","TProgressU") ' var_Bar2.Def(4) = 18 oG2antt.TemplateDef = "dim var_Bar2" oG2antt.TemplateDef = var_Bar2 oG2antt.Template = "var_Bar2.Def(4) = 18" var_Bar2.Shape = 18 var_Items = oG2antt.Items h = var_Items.AddItem("Task") var_Items.AddBar(h,"Task",{09/25/2006},{09/30/2006},"T1") var_Items.AddBar(h,"TProgressU",{09/25/2006},{10/04/2006},"TP1") var_Items.GroupBars(h,"T1",.t.,h,"TP1",.t.,3) ' var_Items.ItemBar(h,"TP1",3) = "<font ;6>progress up" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`TP1`,3) = `<font ;6>progress up`" h = var_Items.AddItem("Task") var_Items.AddBar(h,"Task",{09/26/2006},{10/01/2006},"T2") var_Items.AddBar(h,"TProgressC",{09/26/2006},{10/05/2006},"TP2") var_Items.GroupBars(h,"T2",.t.,h,"TP2",.t.,3) ' var_Items.ItemBar(h,"TP2",3) = "<font ;6>progress center" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`TP2`,3) = `<font ;6>progress center`" h = var_Items.AddItem("Task") var_Items.AddBar(h,"Task",{09/25/2006},{09/30/2006},"T3") var_Items.AddBar(h,"TProgressD",{09/25/2006},{10/06/2006},"TP3") var_Items.GroupBars(h,"T3",.t.,h,"TP3",.t.,3) ' var_Items.ItemBar(h,"TP3",3) = "<font ;6>progress down" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`TP3`,3) = `<font ;6>progress down`" oG2antt.EndUpdate() |
1781 |
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary, inclusive, working)
Dim h as N Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Bar as P Dim var_Bar1 as P Dim var_Bars as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Columns as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.MarkSearchColumn = .f. oG2antt.Indent = 11 oG2antt.HasLines = 1 oG2antt.Items.AllowCellValueToItemBar = .t. var_Columns = oG2antt.Columns var_Columns.Add("Tasks") var_Column = var_Columns.Add("Start") ' var_Column.Def(18) = 544 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 544" var_Column.Editor.EditType = 7 var_Column.LevelKey = 1 var_Column1 = var_Columns.Add("End") ' var_Column1.Def(18) = 546 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 546" var_Column1.Editor.EditType = 7 var_Column1.LevelKey = 1 var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {09/20/2006} var_Chart.AllowLinkBars = .f. var_Chart.AllowCreateBar = 0 var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 224 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 224" var_Bars = var_Chart.Bars var_Bar = var_Bars.Add("Underline") var_Bar.Color = 16711680 var_Bar.Shape = 20 var_Bar1 = var_Bars.Add("Task:Underline") var_Bar1.Shortcut = "T" ' var_Bar1.Def(20) = .t. oG2antt.TemplateDef = "dim var_Bar1" oG2antt.TemplateDef = var_Bar1 oG2antt.Template = "var_Bar1.Def(20) = True" var_Items = oG2antt.Items h = var_Items.AddItem("Project") var_Items.AddBar(h,"Summary",{09/21/2006},{10/03/2006}) h1 = var_Items.InsertItem(h,,"Task 1") var_Items.AddBar(h1,"T",{09/21/2006},{09/24/2006}) h2 = var_Items.InsertItem(h,,"Task 2") var_Items.AddBar(h2,"T",{09/24/2006},{09/28/2006}) h3 = var_Items.InsertItem(h,,"Task 3") var_Items.AddBar(h3,"T",{09/28/2006},{10/03/2006}) var_Items.DefineSummaryBars(h,"",h1,"") var_Items.DefineSummaryBars(h,"",h2,"") var_Items.DefineSummaryBars(h,"",h3,"") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" ' var_Items.ItemBold(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBold(h) = True" ' var_Items.ItemBar(h,"",544) = {09/22/2006} oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,544) = #9/22/2006#" oG2antt.EndUpdate() |
1780 |
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary)
Dim h as N Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Columns as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.MarkSearchColumn = .f. oG2antt.Indent = 11 oG2antt.HasLines = 1 oG2antt.Items.AllowCellValueToItemBar = .t. var_Columns = oG2antt.Columns var_Columns.Add("Tasks") var_Column = var_Columns.Add("Start") ' var_Column.Def(18) = 544 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 544" var_Column.Editor.EditType = 7 var_Column.LevelKey = 1 var_Column1 = var_Columns.Add("End") ' var_Column1.Def(18) = 545 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 545" var_Column1.Editor.EditType = 7 var_Column1.LevelKey = 1 var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {09/20/2006} var_Chart.AllowLinkBars = .f. var_Chart.AllowCreateBar = 0 var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 224 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 224" var_Items = oG2antt.Items h = var_Items.AddItem("Project") var_Items.AddBar(h,"Summary",{09/21/2006},{10/03/2006}) h1 = var_Items.InsertItem(h,,"Task 1") var_Items.AddBar(h1,"Task",{09/21/2006},{09/24/2006}) h2 = var_Items.InsertItem(h,,"Task 2") var_Items.AddBar(h2,"Task",{09/24/2006},{09/28/2006}) h3 = var_Items.InsertItem(h,,"Task 3") var_Items.AddBar(h3,"Task",{09/28/2006},{10/03/2006}) var_Items.DefineSummaryBars(h,"",h1,"") var_Items.DefineSummaryBars(h,"",h2,"") var_Items.DefineSummaryBars(h,"",h3,"") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" ' var_Items.ItemBold(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBold(h) = True" ' var_Items.ItemBar(h,"",544) = {09/22/2006} oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,544) = #9/22/2006#" oG2antt.EndUpdate() |
1779 |
Is it possible to programmatically move all bars of specified key to end at specified date (inclusive)
Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",{01/01/2001},{01/06/2001},"A") var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",{01/02/2001},{01/07/2001},"A") var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",{01/03/2001},{01/08/2001},"B") var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",{01/04/2001},{01/09/2001},"B") ' var_Items.ItemBar(0,"<A*>",546) = {01/02/2001} oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ItemBar(0,`<A*>`,546) = #1/2/2001#" oG2antt.EndUpdate() |
1778 |
Is it possible to programmatically move all bars to end at specified date (inclusive)
Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",{01/01/2001},{01/06/2001},"A") var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",{01/02/2001},{01/07/2001},"A") var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",{01/03/2001},{01/08/2001},"B") var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",{01/04/2001},{01/09/2001},"B") ' var_Items.ItemBar(0,"<*>",546) = {01/02/2001} oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ItemBar(0,`<*>`,546) = #1/2/2001#" oG2antt.EndUpdate() |
1777 |
Is it possible to programmatically move all bars of specified key to end at specified date
Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",{01/01/2001},{01/06/2001},"A") var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",{01/02/2001},{01/07/2001},"A") var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",{01/03/2001},{01/08/2001},"B") var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",{01/04/2001},{01/09/2001},"B") ' var_Items.ItemBar(0,"<A*>",545) = {01/02/2001} oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ItemBar(0,`<A*>`,545) = #1/2/2001#" oG2antt.EndUpdate() |
1776 |
Is it possible to programmatically move all bars to end at specified date
Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",{01/01/2001},{01/06/2001},"A") var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",{01/02/2001},{01/07/2001},"A") var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",{01/03/2001},{01/08/2001},"B") var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",{01/04/2001},{01/09/2001},"B") ' var_Items.ItemBar(0,"<*>",545) = {01/02/2001} oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ItemBar(0,`<*>`,545) = #1/2/2001#" oG2antt.EndUpdate() |
1775 |
Is it possible to programmatically move all bars of specified key to start at specified date
Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",{01/01/2001},{01/06/2001},"A") var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",{01/02/2001},{01/07/2001},"A") var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",{01/03/2001},{01/08/2001},"B") var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",{01/04/2001},{01/09/2001},"B") ' var_Items.ItemBar(0,"<A*>",544) = {01/02/2001} oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ItemBar(0,`<A*>`,544) = #1/2/2001#" oG2antt.EndUpdate() |
1774 |
Is it possible to programmatically move all bars to start at specified date
Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",{01/01/2001},{01/06/2001},"A") var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",{01/02/2001},{01/07/2001},"A") var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",{01/03/2001},{01/08/2001},"B") var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",{01/04/2001},{01/09/2001},"B") ' var_Items.ItemBar(0,"<*>",544) = {01/02/2001} oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ItemBar(0,`<*>`,544) = #1/2/2001#" oG2antt.EndUpdate() |
1773 |
Is it possible to programmatically move all bars of specified key
Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",{01/01/2001},{01/06/2001},"A") var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",{01/02/2001},{01/07/2001},"A") var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",{01/03/2001},{01/08/2001},"B") var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",{01/04/2001},{01/09/2001},"B") ' var_Items.ItemBar(0,"<A*>",514) = 2 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ItemBar(0,`<A*>`,514) = 2" oG2antt.EndUpdate() |
1772 |
Is it possible to programmatically move all bars
Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task A.1"),"Task",{01/01/2001},{01/06/2001},"A") var_Items.AddBar(var_Items.AddItem("Task A.2"),"Task",{01/02/2001},{01/07/2001},"A") var_Items.AddBar(var_Items.AddItem("Task B.1"),"Task",{01/03/2001},{01/08/2001},"B") var_Items.AddBar(var_Items.AddItem("Task B.2"),"Task",{01/04/2001},{01/09/2001},"B") ' var_Items.ItemBar(0,"<*>",514) = 2 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ItemBar(0,`<*>`,514) = 2" oG2antt.EndUpdate() |
1771 |
How can I programmatically move a bar, so it ends at specified date (inclusive)
Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items h = var_Items.AddItem("Task 1") var_Items.AddBar(h,"Task",{01/01/2001},{01/06/2001},"A") ' var_Items.ItemBar(h,"A",546) = {01/04/2001} oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`A`,546) = #1/4/2001#" |
1770 |
How can I programmatically move a bar, so it ends at specified date
Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items h = var_Items.AddItem("Task 1") var_Items.AddBar(h,"Task",{01/01/2001},{01/06/2001},"A") ' var_Items.ItemBar(h,"A",545) = {01/04/2001} oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`A`,545) = #1/4/2001#" |
1769 |
How can I programmatically move a bar, so it starts at specified date
Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Columns.Add("Tasks") var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Items = oG2antt.Items h = var_Items.AddItem("Task 1") var_Items.AddBar(h,"Task",{01/01/2001},{01/06/2001},"A") ' var_Items.ItemBar(h,"A",544) = {01/04/2001} oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`A`,544) = #1/4/2001#" |
1768 |
I can’t figure out how to control the date and time format (in level 0, 1 and 2) when the user click on the OverviewZoom bottom
Dim oG2antt as P Dim var_Chart as P Dim var_Level as P Dim var_Level1 as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.HeaderHeight = 22 var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2016} ' var_Chart.PaneWidth(.f.) = 0 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 0" var_Chart.LevelCount = 2 var_Chart.DrawLevelSeparator = 2 var_Chart.AllowResizeChart = 6 'exAllowResizeChartMiddle + exAllowResizeChartHeader var_Chart.MaxUnitWidth = 196 var_Level = var_Chart.Level(0) var_Level.Alignment = 17 'exHOutside + CenterAlignment var_Level.DrawTickLines = 2 var_Level1 = var_Chart.Level(1) var_Level1.DrawTickLines = 65 'exLevelMiddleLine + exLevelDotLine var_Level1.DrawTickLinesFrom(0,2) var_Level1.BackColor = 15790320 var_Chart.OverviewVisible = 2 var_Chart.AllowOverviewZoom = 1 var_Chart.UnitWidth = 24 ' var_Chart.Label(16777216) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(16777216) = ``" ' var_Chart.Label(1048576) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(1048576) = ``" ' var_Chart.Label(65536) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(65536) = ``" ' var_Chart.Label(256) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(256) = ``" ' var_Chart.Label(4096) = "<font ;6><%d%><|><%d%><|><%d%> <fgcolor=A0A0A0><off -4><%d1%><|><%d%> <fgcolor=A0A0A0><off -4><%d2%><|><%d%> <fgcolor=A0A0A0><off -4><%d3%><|><%d%> <fgcolor=A0A0A0><off -4><%dddd%><||><||>4096" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(4096) = `<font ;6><%d%><|><%d%><|><%d%> <fgcolor=A0A0A0><off -4><%d1%><|><%d%> <fgcolor=A0A0A0><off -4><%d2%><|><%d%> <fgcolor=A0A0A0><off -4><%d3%><|><%d%> <fgcolor=A0A0A0><off -4><%dddd%><||><||>4096`" var_Chart.UnitScale = 4096 var_Chart.ScrollTo(var_Chart.FirstVisibleDate,1) oG2antt.Columns.Add("Default") oG2antt.EndUpdate() |
1767 |
Can I use GroupBars with OverlaidType method
Dim h as N Dim h1 as N Dim h2 as Dim h3 as Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") oG2antt.Debug = .t. oG2antt.LinesAtRoot = -1 oG2antt.ScrollBySingleLine = .t. oG2antt.BackColorLevelHeader = oG2antt.BackColor var_Chart = oG2antt.Chart var_Chart.LevelCount = 2 var_Chart.FirstVisibleDate = {09/20/2006} ' var_Chart.PaneWidth(.f.) = 96 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 96" var_Chart.Bars.Item("Task").OverlaidType = 3 var_Items = oG2antt.Items h = var_Items.AddItem("Project") var_Items.AddBar(h,"Summary",{09/21/2006},{10/04/2006}) h1 = var_Items.InsertItem(h,,"Tasks") var_Items.AddBar(h1,"Task",{09/21/2006},{09/26/2006},"h1") h2 = h1 var_Items.AddBar(h2,"Task",{09/25/2006},{09/30/2006},"h2") var_Items.AddLink("L1",h1,"h1",h2,"h2") h3 = h1 var_Items.AddBar(h3,"Task",{09/29/2006},{10/04/2006},"h3") var_Items.AddLink("L2",h2,"h2",h3,"h3") var_Items.DefineSummaryBars(h,"",h1,"h1") var_Items.DefineSummaryBars(h,"",h2,"h2") var_Items.DefineSummaryBars(h,"",h3,"h3") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" ' var_Items.ItemBold(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBold(h) = True" var_Items.GroupBars(h1,"h1",.f.,h2,"h2",.t.,31,"0;5;-1") var_Items.GroupBars(h2,"h2",.f.,h3,"h3",.t.,31,"0;5;-1") oG2antt.EndUpdate() |
1766 |
How do I change the link's lag so I can schedule bars to start later (with nonworking part)
' Occurs when a bar is moving or resizing. function BarResizing as v (Item as OLE::Exontrol.G2antt.1::HITEM,Key as A) oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Items.SchedulePDM(Item,Key) end function Dim h1 as N Dim h2 as N Dim h3 as N Dim h4 as N Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.DefaultItemHeight = 22 oG2antt.HeaderHeight = oG2antt.DefaultItemHeight oG2antt.BackColorLevelHeader = oG2antt.BackColor oG2antt.AntiAliasing = .t. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.LinksStyle = 0 var_Chart.LinksColor = 8421504 var_Chart.LevelCount = 2 var_Chart.FirstVisibleDate = {12/28/2000} ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Bar = var_Chart.Bars.Item("Task") ' var_Bar.Def(20) = .t. oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(20) = True" ' var_Bar.Def(4) = 18 oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(4) = 18" var_Bar.Color = 0 var_Bar.StartColor = 12500670 var_Bar.EndColor = var_Bar.StartColor var_Bar.Pattern = 32 var_Items = oG2antt.Items h1 = var_Items.AddItem("Task 1") var_Items.AddBar(h1,"Task",{01/02/2001},{01/05/2001},"K1","FS lag=0 (default)") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/02/2001},{01/05/2001},"K2","FS lag=4") var_Items.AddLink("L1",h1,"K1",h2,"K2") h3 = var_Items.AddItem("Task 3") var_Items.AddBar(h3,"Task",{01/02/2001},{01/05/2001},"K3","FS lag=-1") var_Items.AddLink("L2",h2,"K2",h3,"K3") ' var_Items.Link("L2",16) = 4 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`L2`,16) = 4" h4 = var_Items.AddItem("Task 4") var_Items.AddBar(h4,"Task",{01/02/2001},{01/05/2001},"K4") var_Items.AddLink("L3",h3,"K3",h4,"K4") ' var_Items.Link("L3",16) = -1 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`L3`,16) = -1" var_Items.SchedulePDM(0,"K1") oG2antt.EndUpdate() |
1765 |
How do I change the link's lag so I can schedule bars to start later (without nonworking part)
' Occurs when a bar is moving or resizing. function BarResizing as v (Item as OLE::Exontrol.G2antt.1::HITEM,Key as A) oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Items.SchedulePDM(Item,Key) end function Dim h1 as N Dim h2 as N Dim h3 as N Dim h4 as N Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.DefaultItemHeight = 22 oG2antt.HeaderHeight = oG2antt.DefaultItemHeight oG2antt.BackColorLevelHeader = oG2antt.BackColor oG2antt.AntiAliasing = .t. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.LinksStyle = 0 var_Chart.LinksColor = 8421504 var_Chart.LevelCount = 2 var_Chart.NonworkingDays = 0 var_Chart.FirstVisibleDate = {12/28/2000} ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Bar = var_Chart.Bars.Item("Task") ' var_Bar.Def(4) = 18 oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(4) = 18" var_Bar.Color = 0 var_Bar.StartColor = 12500670 var_Bar.EndColor = var_Bar.StartColor var_Bar.Pattern = 32 var_Items = oG2antt.Items h1 = var_Items.AddItem("Task 1") var_Items.AddBar(h1,"Task",{01/02/2001},{01/05/2001},"K1","FS lag=0 (default)") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/02/2001},{01/05/2001},"K2","FS lag=4") var_Items.AddLink("L1",h1,"K1",h2,"K2") h3 = var_Items.AddItem("Task 3") var_Items.AddBar(h3,"Task",{01/02/2001},{01/05/2001},"K3","FS lag=-1") var_Items.AddLink("L2",h2,"K2",h3,"K3") ' var_Items.Link("L2",17) = 4 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`L2`,17) = 4" h4 = var_Items.AddItem("Task 4") var_Items.AddBar(h4,"Task",{01/02/2001},{01/05/2001},"K4") var_Items.AddLink("L3",h3,"K3",h4,"K4") ' var_Items.Link("L3",17) = -1 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`L3`,17) = -1" var_Items.SchedulePDM(0,"K1") oG2antt.EndUpdate() |
1764 |
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column
' Occurs after a new Group Item has been inserted to Items collection. function AddGroupItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Summary",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) var_Items.DefineSummaryBars(Item,"",-3,"") end function ' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function ' Occurs when the user presses a mouse button. function MouseDown as v (Button as N,Shift as N,X as OLE::Exontrol.G2antt.1::OLE_XPOS_PIXELS,Y as OLE::Exontrol.G2antt.1::OLE_YPOS_PIXELS) Dim i as N oG2antt = topparent:CONTROL_ACTIVEX1.activex i = oG2antt.ItemFromPoint(-1,-1,c,hit) oG2antt.FullRowSelect = oG2antt.Columns.Item(c).Data end function Dim oG2antt as P Dim rs as P Dim var_Chart as local oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.HeaderHeight = 22 oG2antt.HeaderAppearance = 1 oG2antt.BackColorLock = 15790320 oG2antt.BackColorHeader = oG2antt.BackColorLock oG2antt.HasLines = 0 oG2antt.ColumnAutoResize = .f. oG2antt.SortBarVisible = .f. oG2antt.AllowGroupBy = .t. oG2antt.ReadOnly = -1 oG2antt.ShowFocusRect = .f. oG2antt.CountLockedColumns = 1 oG2antt.AutoDrag = 16 oG2antt.SingleSort = .f. oG2antt.ColumnsAllowSizing = .t. oG2antt.DrawGridLines = -1 oG2antt.GridLineStyle = 48 oG2antt.GridLineColor = 14474460 oG2antt.Chart.FirstVisibleDate = {09/01/1994} oG2antt.Chart.LevelCount = 2 ' oG2antt.Chart.PaneWidth(.f.) = 256 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 256" oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.Columns.Item(0).Data = -1 oG2antt.Layout = "singlesort=\"C5:1\";multiplesort=\" C1:2\"" oG2antt.EndUpdate() |
1763 |
I've also hit a strange problem with the BeforeExpandItem event - the Cancel parameter is declared as const in Delphi when I believe it should be declared as var or out so I can use it to return OleVariant(True) to cancel the operation, or am I missing something, or how can I disable expanding / collapsing the items
' Fired before an item is about to be expanded (collapsed). function BeforeExpandItem as v (Item as OLE::Exontrol.G2antt.1::HITEM,Cancel as A) oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Template = "EventParam(1) = True" // oG2antt.EventParam(1) = .t. end function ' Notifies the application once the control fires an event. function Event as v (EventID as N) oG2antt = topparent:CONTROL_ACTIVEX1.activex ? oG2antt.EventParam(-2) end function Dim h as N Dim oG2antt as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.LinesAtRoot = -1 oG2antt.Columns.Add("Default") var_Items = oG2antt.Items h = var_Items.AddItem("Root A") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root B") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" oG2antt.EndUpdate() |
1762 |
Is there any way I can get rid / hide of the vertical blue lines ( today, selected date )
Dim oG2antt as P Dim var_Chart as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.LevelCount = 2 var_Chart.MarkSelectDateColor = var_Chart.BackColor var_Chart.MarkTodayColor = var_Chart.BackColor oG2antt.EndUpdate() |
1761 |
Is it possible to search for a bar through items only ( not including the locked items )
Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Items as P Dim var_Items1 as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.LevelCount = 2 var_Chart.FirstVisibleDate = {12/31/2015} oG2antt.BackColorAlternate = 16448250 oG2antt.ShowLockedItems = .t. oG2antt.Columns.Add("Column") var_Column = oG2antt.Columns.Add("Find") ' var_Column.Def(17) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(17) = 1" var_Column.Visible = .f. var_Column.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` " oG2antt.Chart.ColumnsFormatLevel = "1" var_Items = oG2antt.Items ' var_Items.LockedItemCount(0) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.LockedItemCount(0) = 3" h = var_Items.LockedItem(0,0) ' var_Items.CellValue(h,0) = "locked-top 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-top 1`" var_Items.AddBar(h,"Task",{01/04/2016},{01/08/2016},"T1") h = var_Items.LockedItem(0,1) ' var_Items.CellValue(h,0) = "locked-top 2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-top 2`" var_Items.AddBar(h,"Task",{01/05/2016},{01/09/2016},"T2") h = var_Items.LockedItem(0,2) ' var_Items.SelectItem(h) = .f. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = False" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemHeight(h) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemHeight(h) = 2" var_Items.AddBar(var_Items.AddItem("un-locked item 1"),"Task",{01/04/2016},{01/08/2016},"T3") var_Items.AddBar(var_Items.AddItem("un-locked item 2"),"Task",{01/05/2016},{01/09/2016},"T4") ' var_Items.LockedItemCount(1) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.LockedItemCount(1) = 3" h = var_Items.LockedItem(1,0) ' var_Items.SelectItem(h) = .f. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = False" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemHeight(h) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemHeight(h) = 2" h = var_Items.LockedItem(1,1) ' var_Items.CellValue(h,0) = "locked-bottom 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-bottom 1`" var_Items.AddBar(h,"Task",{01/04/2016},{01/08/2016},"T5") h = var_Items.LockedItem(1,2) ' var_Items.CellValue(h,0) = "locked-bottom 2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-bottom 2`" var_Items.AddBar(h,"Task",{01/05/2016},{01/09/2016},"T6") var_Items1 = oG2antt.Items h = var_Items1.FindBar("T4",0) ' var_Items1.ItemBar(h,var_Items1.FirstItemBar(h),33) = 255 oG2antt.TemplateDef = "dim var_Items1,h" oG2antt.TemplateDef = var_Items1 oG2antt.TemplateDef = h oG2antt.Template = "var_Items1.ItemBar(h,FirstItemBar(h),33) = 255" ' var_Items1.CellValue(h,1) = h oG2antt.TemplateDef = "dim var_Items1,h" oG2antt.TemplateDef = var_Items1 oG2antt.TemplateDef = h oG2antt.Template = "var_Items1.CellValue(h,1) = h" oG2antt.EndUpdate() |
1760 |
Is it possible to search for a bar through bottom-locked-items only
Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Items as P Dim var_Items1 as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.LevelCount = 2 var_Chart.FirstVisibleDate = {12/31/2015} oG2antt.BackColorAlternate = 16448250 oG2antt.ShowLockedItems = .t. oG2antt.Columns.Add("Column") var_Column = oG2antt.Columns.Add("Find") ' var_Column.Def(17) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(17) = 1" var_Column.Visible = .f. var_Column.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` " oG2antt.Chart.ColumnsFormatLevel = "1" var_Items = oG2antt.Items ' var_Items.LockedItemCount(0) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.LockedItemCount(0) = 3" h = var_Items.LockedItem(0,0) ' var_Items.CellValue(h,0) = "locked-top 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-top 1`" var_Items.AddBar(h,"Task",{01/04/2016},{01/08/2016},"T1") h = var_Items.LockedItem(0,1) ' var_Items.CellValue(h,0) = "locked-top 2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-top 2`" var_Items.AddBar(h,"Task",{01/05/2016},{01/09/2016},"T2") h = var_Items.LockedItem(0,2) ' var_Items.SelectItem(h) = .f. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = False" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemHeight(h) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemHeight(h) = 2" var_Items.AddBar(var_Items.AddItem("un-locked item 1"),"Task",{01/04/2016},{01/08/2016},"T3") var_Items.AddBar(var_Items.AddItem("un-locked item 2"),"Task",{01/05/2016},{01/09/2016},"T4") ' var_Items.LockedItemCount(1) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.LockedItemCount(1) = 3" h = var_Items.LockedItem(1,0) ' var_Items.SelectItem(h) = .f. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = False" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemHeight(h) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemHeight(h) = 2" h = var_Items.LockedItem(1,1) ' var_Items.CellValue(h,0) = "locked-bottom 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-bottom 1`" var_Items.AddBar(h,"Task",{01/04/2016},{01/08/2016},"T5") h = var_Items.LockedItem(1,2) ' var_Items.CellValue(h,0) = "locked-bottom 2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-bottom 2`" var_Items.AddBar(h,"Task",{01/05/2016},{01/09/2016},"T6") var_Items1 = oG2antt.Items h = var_Items1.FindBar("T6",-4) ' var_Items1.ItemBar(h,var_Items1.FirstItemBar(h),33) = 255 oG2antt.TemplateDef = "dim var_Items1,h" oG2antt.TemplateDef = var_Items1 oG2antt.TemplateDef = h oG2antt.Template = "var_Items1.ItemBar(h,FirstItemBar(h),33) = 255" ' var_Items1.CellValue(h,1) = h oG2antt.TemplateDef = "dim var_Items1,h" oG2antt.TemplateDef = var_Items1 oG2antt.TemplateDef = h oG2antt.Template = "var_Items1.CellValue(h,1) = h" oG2antt.EndUpdate() |
1759 |
Is it possible to search for a bar through top-locked-items only
Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Items as P Dim var_Items1 as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.LevelCount = 2 var_Chart.FirstVisibleDate = {12/31/2015} oG2antt.BackColorAlternate = 16448250 oG2antt.ShowLockedItems = .t. oG2antt.Columns.Add("Column") var_Column = oG2antt.Columns.Add("Find") ' var_Column.Def(17) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(17) = 1" var_Column.Visible = .f. var_Column.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` " oG2antt.Chart.ColumnsFormatLevel = "1" var_Items = oG2antt.Items ' var_Items.LockedItemCount(0) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.LockedItemCount(0) = 3" h = var_Items.LockedItem(0,0) ' var_Items.CellValue(h,0) = "locked-top 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-top 1`" var_Items.AddBar(h,"Task",{01/04/2016},{01/08/2016},"T1") h = var_Items.LockedItem(0,1) ' var_Items.CellValue(h,0) = "locked-top 2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-top 2`" var_Items.AddBar(h,"Task",{01/05/2016},{01/09/2016},"T2") h = var_Items.LockedItem(0,2) ' var_Items.SelectItem(h) = .f. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = False" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemHeight(h) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemHeight(h) = 2" var_Items.AddBar(var_Items.AddItem("un-locked item 1"),"Task",{01/04/2016},{01/08/2016},"T3") var_Items.AddBar(var_Items.AddItem("un-locked item 2"),"Task",{01/05/2016},{01/09/2016},"T4") ' var_Items.LockedItemCount(1) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.LockedItemCount(1) = 3" h = var_Items.LockedItem(1,0) ' var_Items.SelectItem(h) = .f. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = False" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemHeight(h) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemHeight(h) = 2" h = var_Items.LockedItem(1,1) ' var_Items.CellValue(h,0) = "locked-bottom 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-bottom 1`" var_Items.AddBar(h,"Task",{01/04/2016},{01/08/2016},"T5") h = var_Items.LockedItem(1,2) ' var_Items.CellValue(h,0) = "locked-bottom 2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-bottom 2`" var_Items.AddBar(h,"Task",{01/05/2016},{01/09/2016},"T6") var_Items1 = oG2antt.Items h = var_Items1.FindBar("T1",-3) ' var_Items1.ItemBar(h,var_Items1.FirstItemBar(h),33) = 255 oG2antt.TemplateDef = "dim var_Items1,h" oG2antt.TemplateDef = var_Items1 oG2antt.TemplateDef = h oG2antt.Template = "var_Items1.ItemBar(h,FirstItemBar(h),33) = 255" ' var_Items1.CellValue(h,1) = h oG2antt.TemplateDef = "dim var_Items1,h" oG2antt.TemplateDef = var_Items1 oG2antt.TemplateDef = h oG2antt.Template = "var_Items1.CellValue(h,1) = h" oG2antt.EndUpdate() |
1758 |
Is it possible to search for a bar through all locked-items only
Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Items as P Dim var_Items1 as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.LevelCount = 2 var_Chart.FirstVisibleDate = {12/31/2015} oG2antt.BackColorAlternate = 16448250 oG2antt.ShowLockedItems = .t. oG2antt.Columns.Add("Column") var_Column = oG2antt.Columns.Add("Find") ' var_Column.Def(17) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(17) = 1" var_Column.Visible = .f. var_Column.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` " oG2antt.Chart.ColumnsFormatLevel = "1" var_Items = oG2antt.Items ' var_Items.LockedItemCount(0) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.LockedItemCount(0) = 3" h = var_Items.LockedItem(0,0) ' var_Items.CellValue(h,0) = "locked-top 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-top 1`" var_Items.AddBar(h,"Task",{01/04/2016},{01/08/2016},"T1") h = var_Items.LockedItem(0,1) ' var_Items.CellValue(h,0) = "locked-top 2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-top 2`" var_Items.AddBar(h,"Task",{01/05/2016},{01/09/2016},"T2") h = var_Items.LockedItem(0,2) ' var_Items.SelectItem(h) = .f. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = False" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemHeight(h) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemHeight(h) = 2" var_Items.AddBar(var_Items.AddItem("un-locked item 1"),"Task",{01/04/2016},{01/08/2016},"T3") var_Items.AddBar(var_Items.AddItem("un-locked item 2"),"Task",{01/05/2016},{01/09/2016},"T4") ' var_Items.LockedItemCount(1) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.LockedItemCount(1) = 3" h = var_Items.LockedItem(1,0) ' var_Items.SelectItem(h) = .f. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = False" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemHeight(h) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemHeight(h) = 2" h = var_Items.LockedItem(1,1) ' var_Items.CellValue(h,0) = "locked-bottom 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-bottom 1`" var_Items.AddBar(h,"Task",{01/04/2016},{01/08/2016},"T5") h = var_Items.LockedItem(1,2) ' var_Items.CellValue(h,0) = "locked-bottom 2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-bottom 2`" var_Items.AddBar(h,"Task",{01/05/2016},{01/09/2016},"T6") var_Items1 = oG2antt.Items h = var_Items1.FindBar("T2",-2) ' var_Items1.ItemBar(h,var_Items1.FirstItemBar(h),33) = 255 oG2antt.TemplateDef = "dim var_Items1,h" oG2antt.TemplateDef = var_Items1 oG2antt.TemplateDef = h oG2antt.Template = "var_Items1.ItemBar(h,FirstItemBar(h),33) = 255" ' var_Items1.CellValue(h,1) = h oG2antt.TemplateDef = "dim var_Items1,h" oG2antt.TemplateDef = var_Items1 oG2antt.TemplateDef = h oG2antt.Template = "var_Items1.CellValue(h,1) = h" oG2antt.EndUpdate() |
1757 |
Is it possible to search for a bar through all items ( including locked items )
Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Items as P Dim var_Items1 as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Debug = .t. var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.LevelCount = 2 var_Chart.FirstVisibleDate = {12/31/2015} oG2antt.BackColorAlternate = 16448250 oG2antt.ShowLockedItems = .t. oG2antt.Columns.Add("Column") var_Column = oG2antt.Columns.Add("Find") ' var_Column.Def(17) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(17) = 1" var_Column.Visible = .f. var_Column.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` " oG2antt.Chart.ColumnsFormatLevel = "1" var_Items = oG2antt.Items ' var_Items.LockedItemCount(0) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.LockedItemCount(0) = 3" h = var_Items.LockedItem(0,0) ' var_Items.CellValue(h,0) = "locked-top 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-top 1`" var_Items.AddBar(h,"Task",{01/04/2016},{01/08/2016},"T1") h = var_Items.LockedItem(0,1) ' var_Items.CellValue(h,0) = "locked-top 2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-top 2`" var_Items.AddBar(h,"Task",{01/05/2016},{01/09/2016},"T2") h = var_Items.LockedItem(0,2) ' var_Items.SelectItem(h) = .f. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = False" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemHeight(h) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemHeight(h) = 2" var_Items.AddBar(var_Items.AddItem("un-locked item 1"),"Task",{01/04/2016},{01/08/2016},"T3") var_Items.AddBar(var_Items.AddItem("un-locked item 2"),"Task",{01/05/2016},{01/09/2016},"T4") ' var_Items.LockedItemCount(1) = 3 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.LockedItemCount(1) = 3" h = var_Items.LockedItem(1,0) ' var_Items.SelectItem(h) = .f. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = False" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemHeight(h) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemHeight(h) = 2" h = var_Items.LockedItem(1,1) ' var_Items.CellValue(h,0) = "locked-bottom 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-bottom 1`" var_Items.AddBar(h,"Task",{01/04/2016},{01/08/2016},"T5") h = var_Items.LockedItem(1,2) ' var_Items.CellValue(h,0) = "locked-bottom 2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,0) = `locked-bottom 2`" var_Items.AddBar(h,"Task",{01/05/2016},{01/09/2016},"T6") var_Items1 = oG2antt.Items h = var_Items1.FindBar("T5",-1) ' var_Items1.ItemBar(h,var_Items1.FirstItemBar(h),33) = 255 oG2antt.TemplateDef = "dim var_Items1,h" oG2antt.TemplateDef = var_Items1 oG2antt.TemplateDef = h oG2antt.Template = "var_Items1.ItemBar(h,FirstItemBar(h),33) = 255" ' var_Items1.CellValue(h,1) = h oG2antt.TemplateDef = "dim var_Items1,h" oG2antt.TemplateDef = var_Items1 oG2antt.TemplateDef = h oG2antt.Template = "var_Items1.CellValue(h,1) = h" oG2antt.EndUpdate() |
1756 |
How do I clip/hide/align the bar's caption/text based on the bar's size/width/length
Dim h as N Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Clip") oG2antt.ScrollBySingleLine = .t. oG2antt.DrawGridLines = -2 var_Chart = oG2antt.Chart var_Chart.AllowResizeChart = 6 'exAllowResizeChartMiddle + exAllowResizeChartHeader var_Chart.DrawGridLines = -2 var_Chart.FirstVisibleDate = {12/23/2000} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 216 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 216" var_Bar = var_Chart.Bars.Item("Task") var_Bar.Pattern = 32 var_Bar.Color = 10790052 var_Bar.StartColor = 15790320 var_Bar.EndColor = var_Bar.StartColor var_Bar.OverlaidType = 4611 'exOverlaidBarsIncludeCaption + exOverlaidBarsStackAutoArrange + exOverlaidBarsStack var_Bar.Height = 15 var_Chart.MinUnitWidth = var_Chart.UnitWidth var_Items = oG2antt.Items h = var_Items.AddItem("no clip, (0-2)") var_Items.AddBar(h,"Task",{01/02/2001},{01/04/2001},"K1","no clip, right(<b>2</b>)") ' var_Items.ItemBar(h,"K1",4) = 2 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,4) = 2" var_Items.AddBar(h,"Task",{01/02/2001},{01/04/2001},"K2","no clip, center(<b>1</b>)") ' var_Items.ItemBar(h,"K2",4) = 1 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,4) = 1" var_Items.AddBar(h,"Task",{01/02/2001},{01/04/2001},"K3","no clip, left(<b>0</b>)") ' var_Items.ItemBar(h,"K3",4) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,4) = 0" h = var_Items.AddItem("clip, inside (3-5)") var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K1","clip, inside, right(<b>5</b>)") ' var_Items.ItemBar(h,"K1",4) = 5 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,4) = 5" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K2","clip, inside, center(<b>4</b>)") ' var_Items.ItemBar(h,"K2",4) = 4 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,4) = 4" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K3","clip, inside, left(<b>3</b>)") ' var_Items.ItemBar(h,"K3",4) = 3 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,4) = 3" h = var_Items.AddItem("hide on min width, clip if not fit, inside (6-8)") var_Items.AddBar(h,"Task",{12/26/2000},{01/10/2001},"K1","hide on min width, clip if not fit, inside, right(<b>8</b>)") ' var_Items.ItemBar(h,"K1",4) = 8 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,4) = 8" var_Items.AddBar(h,"Task",{12/26/2000},{01/10/2001},"K2","hide on min width, clip if not fit, inside, center(<b>7</b>)") ' var_Items.ItemBar(h,"K2",4) = 7 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,4) = 7" var_Items.AddBar(h,"Task",{12/26/2000},{01/10/2001},"K3","hide on min width, clip if not fit, inside, left(<b>6</b>)") ' var_Items.ItemBar(h,"K3",4) = 6 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,4) = 6" h = var_Items.AddItem("hide if not fit, no clip, inside (9-11)") var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K1","hide if not fit, no clip, inside, right(<b>11</b>)") ' var_Items.ItemBar(h,"K1",4) = 11 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,4) = 11" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K2","hide if not fit, no clip, center(<b>10</b>)") ' var_Items.ItemBar(h,"K2",4) = 10 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,4) = 10" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K3","hide if not fit, no clip, inside, left(<b>9</b>)") ' var_Items.ItemBar(h,"K3",4) = 9 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,4) = 9" h = var_Items.AddItem("no clip, inside, outside (12-14)") var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K1","no clip, inside, outside, right(<b>14</b>)") ' var_Items.ItemBar(h,"K1",4) = 14 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,4) = 14" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K2","no clip, inside, outside, center(<b>13</b>)") ' var_Items.ItemBar(h,"K2",4) = 13 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,4) = 13" var_Items.AddBar(h,"Task",{12/28/2000},{01/08/2001},"K3","no clip, inside, outside, left(<b>12</b>)") ' var_Items.ItemBar(h,"K3",4) = 12 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,4) = 12" h = var_Items.AddItem("no clip, outside (16-18)") var_Items.AddBar(h,"Task",{12/30/2000},{01/06/2001},"K1","no clip, outside, right(<b>18</b>)") ' var_Items.ItemBar(h,"K1",4) = 18 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K1`,4) = 18" var_Items.AddBar(h,"Task",{12/30/2000},{01/06/2001},"K2","no clip, outside, center(<b>17</b>)") ' var_Items.ItemBar(h,"K2",4) = 17 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K2`,4) = 17" var_Items.AddBar(h,"Task",{12/30/2000},{01/06/2001},"K3","no clip, outside, left(<b>16</b>)") ' var_Items.ItemBar(h,"K3",4) = 16 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`K3`,4) = 16" oG2antt.EndUpdate() |
1755 |
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 2)
' Occurs when the first visible date is changed. function DateChange as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Chart.FirstVisibleDate = {01/02/2001} end function Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") var_Column = oG2antt.Columns.Add("Start") ' var_Column.Def(18) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 1" var_Column.Visible = .f. var_Column.Alignment = 0 var_Column1 = oG2antt.Columns.Add("End") ' var_Column1.Def(18) = 2 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 2" var_Column1.Visible = .f. var_Column1.Alignment = 2 var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/02/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Chart.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52" var_Chart.ColumnsTransparent = 50 var_Chart.ScrollBar = .f. var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/03/2001},{01/07/2001}) var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/04/2001},{01/08/2001}) oG2antt.EndUpdate() |
1754 |
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar, including limiting the bars
' Occurs when a bar is moving or resizing. function BarResizing as v (Item as OLE::Exontrol.G2antt.1::HITEM,Key as A) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items ' var_Items.ItemBar(Item,Key,22) = {01/01/2001} oG2antt.TemplateDef = "dim var_Items,Item,Key" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = Item oG2antt.TemplateDef = Key oG2antt.Template = "var_Items.ItemBar(Item,Key,22) = #1/1/2001#" ' var_Items.ItemBar(Item,Key,25) = {02/01/2001} oG2antt.TemplateDef = "dim var_Items,Item,Key" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = Item oG2antt.TemplateDef = Key oG2antt.Template = "var_Items.ItemBar(Item,Key,25) = #2/1/2001#" end function Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") var_Column = oG2antt.Columns.Add("Start") ' var_Column.Def(18) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 1" var_Column.Visible = .f. var_Column.Alignment = 0 var_Column1 = oG2antt.Columns.Add("End") ' var_Column1.Def(18) = 2 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 2" var_Column1.Visible = .f. var_Column1.Alignment = 2 var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/02/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Chart.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52" var_Chart.ColumnsTransparent = 50 ' var_Chart.ScrollRange(0) = {01/01/2001} oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.ScrollRange(0) = #1/1/2001#" ' var_Chart.ScrollRange(1) = {01/31/2001} oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.ScrollRange(1) = #1/31/2001#" var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/03/2001},{01/07/2001}) var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/04/2001},{01/08/2001}) oG2antt.EndUpdate() |
1753 |
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 1)
Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") var_Column = oG2antt.Columns.Add("Start") ' var_Column.Def(18) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 1" var_Column.Visible = .f. var_Column.Alignment = 0 var_Column1 = oG2antt.Columns.Add("End") ' var_Column1.Def(18) = 2 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 2" var_Column1.Visible = .f. var_Column1.Alignment = 2 var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/02/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Chart.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52" var_Chart.ColumnsTransparent = 50 ' var_Chart.ScrollRange(0) = {01/01/2001} oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.ScrollRange(0) = #1/1/2001#" ' var_Chart.ScrollRange(1) = {01/31/2001} oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.ScrollRange(1) = #1/31/2001#" var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/03/2001},{01/07/2001}) var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/04/2001},{01/08/2001}) oG2antt.EndUpdate() |
1752 |
Is it possible to have "Preview Window" as a "Modal Window or 'always-on-top window'"
Dim h1 as N Dim h2 as N Dim oG2antt as P Dim var_Items as P Dim var_Print as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Task") oG2antt.Chart.FirstVisibleDate = {01/01/2001} var_Items = oG2antt.Items h1 = var_Items.AddItem("Task 1") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.AddItem("Task 2") var_Items.AddBar(h2,"Task",{01/05/2001},{01/07/2001},"K2") var_Items.AddLink("L1",h1,"K1",h2,"K2") ' var_Items.Link("L1",6) = 0 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`L1`,6) = 0" oG2antt.EndUpdate() var_Print = OLE.Create("Exontrol.Print") ? var_Print.Version var_Print.Foreground = -1 var_Print.PrintExt = oG2antt var_Print.Preview() |
1751 |
The week number is not correct (wrong). What can I do
Dim oG2antt as P Dim var_Chart as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Chart = oG2antt.Chart var_Chart.FirstWeekDay = var_Chart.LocFirstWeekDay var_Chart.MonthNames = var_Chart.LocMonthNames var_Chart.WeekDays = var_Chart.LocWeekDays var_Chart.AMPM = var_Chart.LocAMPM var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 0 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 0" var_Chart.UnitScale = 256 var_Chart.UnitWidth = 32 var_Chart.FirstVisibleDate = {01/01/2016} var_Chart.AdjustLevelsToBase = .t. var_Chart.WeekNumberAs = 0 var_Chart.ShowNonworkingDates = .f. var_Chart.ScrollTo(var_Chart.FirstVisibleDate,1) |
1750 |
When the user zooms with the mouse, the chart automatically switches the unit scale - ideally I'd like to replicate this so I can switch the unitscale at the same "zoom levels" that the mouse zooming does - is this possible
' Occurs after the chart has been changed. function ChartEndChanging as v (Operation as OLE::Exontrol.G2antt.1::BarOperationEnum) Dim var_Chart as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Chart = oG2antt.Chart ? "FirstVisibleDate" ? var_Chart.FirstVisibleDate ? "UnitScale" ? var_Chart.UnitScale ? "UnitWidth" ? var_Chart.UnitWidth end function Dim oG2antt as P Dim var_Chart as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Chart = oG2antt.Chart var_Chart.LevelCount = 3 var_Chart.AllowResizeChart = 262 'exAllowChangeUnitScale + exAllowResizeChartMiddle + exAllowResizeChartHeader ' var_Chart.PaneWidth(.f.) = 0 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 0" var_Chart.MarkTodayColor = var_Chart.BackColor oG2antt.EndUpdate() |
1749 |
The first week number is not correctly assigned. What can I do
Dim oG2antt as P Dim var_Chart as P Dim var_Level as local oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 0 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 0" var_Chart.FirstVisibleDate = {01/01/2016} var_Chart.LevelCount = 2 var_Chart.FirstWeekDay = 1 var_Chart.UnitScale = 256 var_Chart.ScrollTo(var_Chart.FirstVisibleDate,1) var_Chart.DrawGridLines = -1 var_Chart.AdjustLevelsToBase = .t. ' var_Chart.Level(0).Label = "<c><%mmmm%>" var_Level = var_Chart.Level(0) oG2antt.TemplateDef = "dim var_Level" oG2antt.TemplateDef = var_Level oG2antt.Template = "var_Level.Label = `<c><%mmmm%>`" |
1748 |
How can I display the +/- expand - collapse buttons, a bit larger
Dim h as N Dim oG2antt as P Dim var_Appearance as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Appearance = oG2antt.VisualAppearance var_Appearance.Add(3,"c:\exontrol\images\normal.ebn") var_Appearance.Add(4,"c:\exontrol\images\pushed.ebn") var_Appearance.Add(1,"CP:3 -4 -4 4 4") var_Appearance.Add(2,"CP:4 -4 -4 4 4") oG2antt.LinesAtRoot = 1 oG2antt.HasButtons = 4 oG2antt.Template = "HasButtonsCustom(0) = 16777216" // oG2antt.HasButtonsCustom(.f.) = 16777216 oG2antt.Template = "HasButtonsCustom(1) = 33554432" // oG2antt.HasButtonsCustom(.t.) = 33554432 oG2antt.Columns.Add("Column") var_Items = oG2antt.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child") oG2antt.EndUpdate() |
1747 |
Is there any option to control where I can drop the items when using the AutoDrag property
' Occurs when the user drags the item between InsertA and InsertB as child of NewParent. function AllowAutoDrag as v (Item as OLE::Exontrol.G2antt.1::HITEM,NewParent as OLE::Exontrol.G2antt.1::HITEM,InsertA as OLE::Exontrol.G2antt.1::HITEM,InsertB as OLE::Exontrol.G2antt.1::HITEM,Cancel as L) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items ? "NewParent" ? var_Items.CellCaption(NewParent,0) ? "After" ? var_Items.CellCaption(InsertA,0) ? "Before" ? var_Items.CellCaption(InsertB,0) Cancel = .t. end function Dim h as N Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.AutoDrag = 3 oG2antt.LinesAtRoot = 0 oG2antt.HasLines = 2 oG2antt.ShowFocusRect = .f. oG2antt.Columns.Add("Task") var_Chart = oG2antt.Chart var_Chart.ShowNonworkingDates = .f. var_Chart.FirstVisibleDate = {12/29/2000} ' var_Chart.PaneWidth(.f.) = 96 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 96" var_Chart.LevelCount = 2 var_Items = oG2antt.Items h = var_Items.AddItem("Group 1") ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" ' var_Items.ItemBold(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBold(h) = True" h1 = var_Items.InsertItem(h,,"Task 1") var_Items.AddBar(h1,"Task",{01/02/2001},{01/04/2001},"K1") h2 = var_Items.InsertItem(h,,"Task 2") var_Items.AddBar(h2,"Task",{01/05/2001},{01/07/2001},"K2") var_Items.AddLink("L1",h1,"K1",h2,"K2") ' var_Items.Link("L1",12) = "L1" oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`L1`,12) = `L1`" h3 = var_Items.InsertItem(h,,"Task 3") var_Items.AddBar(h3,"Task",{01/08/2001},{01/10/2001},"K3") var_Items.AddLink("L2",h2,"K2",h3,"K3") ' var_Items.Link("L2",12) = "L2" oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.Link(`L2`,12) = `L2`" ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Group 2") ' var_Items.ItemBold(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBold(h) = True" ' var_Items.ItemDivider(h) = 0 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemDivider(h) = 0" oG2antt.EndUpdate() |
1746 |
The column (chart section ) overlaps the bars, when using the ColumnsFormatLevel property. How can I prevent that
Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") var_Column = oG2antt.Columns.Add("Start") ' var_Column.Def(18) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 1" var_Column.Visible = .f. var_Column.Alignment = 0 var_Column1 = oG2antt.Columns.Add("End") ' var_Column1.Def(18) = 2 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 2" var_Column1.Visible = .f. var_Column1.Alignment = 2 var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/02/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Chart.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52" var_Chart.ColumnsTransparent = 50 var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/03/2001},{01/07/2001}) var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/04/2001},{01/08/2001}) oG2antt.EndUpdate() |
1745 |
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 2)
Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") var_Column = oG2antt.Columns.Add("Start") ' var_Column.Def(18) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 1" var_Column.Visible = .f. var_Column.Alignment = 0 var_Column1 = oG2antt.Columns.Add("End") ' var_Column1.Def(18) = 2 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 2" var_Column1.Visible = .f. var_Column1.Alignment = 2 var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/02/2001} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Chart.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52" var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/03/2001},{01/07/2001}) var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/04/2001},{01/08/2001}) oG2antt.EndUpdate() |
1744 |
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 1)
Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") var_Column = oG2antt.Columns.Add("Start") ' var_Column.Def(18) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 1" var_Column.Visible = .f. var_Column.Alignment = 0 ' var_Column.Def(4) = 12500670 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(4) = 12500670" var_Column1 = oG2antt.Columns.Add("End") ' var_Column1.Def(18) = 2 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 2" var_Column1.Visible = .f. var_Column1.Alignment = 2 ' var_Column1.Def(4) = 12500670 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(4) = 12500670" var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {12/31/2000} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 48 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 48" var_Chart.ColumnsFormatLevel = "1:52,|,2:52" var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/03/2001},{01/07/2001}) var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/04/2001},{01/08/2001}) oG2antt.EndUpdate() |
1743 |
How can I display the control's content on an single A3 paper size, when using PDF format
Dim h as N Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_CopyTo as Dim var_Items as P Dim var_Note as P Dim var_Note1 as P Dim var_Notes as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Task") oG2antt.AntiAliasing = .t. var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {12/24/2000} ' var_Chart.PaneWidth(.f.) = 96 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 96" var_Chart.LevelCount = 2 var_Chart.UnitScale = 4096 var_Bar = var_Chart.Bars.Item("Task") var_Bar.Pattern = 1 var_Bar.Color = 0 var_Bar.Height = 16 var_Items = oG2antt.Items h = var_Items.AddItem("Task 1") var_Items.AddBar(h,"Task",{12/25/2000},{01/05/2001},"1","<fgcolor=FFFFFF>Center") ' var_Items.ItemBar(h,"1",44) = "left" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`1`,44) = `left`" ' var_Items.ItemBar(h,"1",45) = 16 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`1`,45) = 16" h = var_Items.AddItem("Task 2") var_Items.AddBar(h,"Task",{01/05/2001},{01/16/2001},"1","<fgcolor=FFFFFF>Center") h = var_Items.AddItem("Task 3") var_Items.AddBar(h,"Task",{01/16/2001},{01/26/2001},"2","Center") ' var_Items.ItemBar(h,"2",44) = "right" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`2`,44) = `right`" ' var_Items.ItemBar(h,"2",45) = 18 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`2`,45) = 18" var_Notes = oG2antt.Chart.Notes var_Note = var_Notes.Add("1S",oG2antt.Items.ItemByIndex(1),"1","<%m3%>-<%d%>") ' var_Note.PartShadow(1) = .f. oG2antt.TemplateDef = "dim var_Note" oG2antt.TemplateDef = var_Note oG2antt.Template = "var_Note.PartShadow(1) = False" ' var_Note.PartHOffset(1) = -16 oG2antt.TemplateDef = "dim var_Note" oG2antt.TemplateDef = var_Note oG2antt.Template = "var_Note.PartHOffset(1) = -16" ' var_Note.PartVOffset(1) = 4 oG2antt.TemplateDef = "dim var_Note" oG2antt.TemplateDef = var_Note oG2antt.Template = "var_Note.PartVOffset(1) = 4" var_Note1 = var_Notes.Add("1F",oG2antt.Items.ItemByIndex(1),"1","<%m3%>-<%d%>") var_Note1.RelativePosition = 1 ' var_Note1.PartShadow(1) = .f. oG2antt.TemplateDef = "dim var_Note1" oG2antt.TemplateDef = var_Note1 oG2antt.Template = "var_Note1.PartShadow(1) = False" ' var_Note1.PartHOffset(1) = 16 oG2antt.TemplateDef = "dim var_Note1" oG2antt.TemplateDef = var_Note1 oG2antt.Template = "var_Note1.PartHOffset(1) = 16" ' var_Note1.PartVOffset(1) = -4 oG2antt.TemplateDef = "dim var_Note1" oG2antt.TemplateDef = var_Note1 oG2antt.Template = "var_Note1.PartVOffset(1) = -4" var_CopyTo = oG2antt.CopyTo("C:\Temp\Preview.pdf|11.69 in x 16.53 in||single") ? "Look for C:\Temp\Preview.pd file." oG2antt.EndUpdate() |
1742 |
How can I display the control's content on an A3 paper size, when using PDF format
Dim h as N Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_CopyTo as Dim var_Items as P Dim var_Note as P Dim var_Note1 as P Dim var_Notes as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Task") oG2antt.AntiAliasing = .t. var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {12/24/2000} ' var_Chart.PaneWidth(.f.) = 96 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 96" var_Chart.LevelCount = 2 var_Chart.UnitScale = 4096 var_Bar = var_Chart.Bars.Item("Task") var_Bar.Pattern = 1 var_Bar.Color = 0 var_Bar.Height = 16 var_Items = oG2antt.Items h = var_Items.AddItem("Task 1") var_Items.AddBar(h,"Task",{12/25/2000},{01/05/2001},"1","<fgcolor=FFFFFF>Center") ' var_Items.ItemBar(h,"1",44) = "left" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`1`,44) = `left`" ' var_Items.ItemBar(h,"1",45) = 16 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`1`,45) = 16" h = var_Items.AddItem("Task 2") var_Items.AddBar(h,"Task",{01/05/2001},{01/16/2001},"1","<fgcolor=FFFFFF>Center") h = var_Items.AddItem("Task 3") var_Items.AddBar(h,"Task",{01/16/2001},{01/26/2001},"2","Center") ' var_Items.ItemBar(h,"2",44) = "right" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`2`,44) = `right`" ' var_Items.ItemBar(h,"2",45) = 18 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`2`,45) = 18" var_Notes = oG2antt.Chart.Notes var_Note = var_Notes.Add("1S",oG2antt.Items.ItemByIndex(1),"1","<%m3%>-<%d%>") ' var_Note.PartShadow(1) = .f. oG2antt.TemplateDef = "dim var_Note" oG2antt.TemplateDef = var_Note oG2antt.Template = "var_Note.PartShadow(1) = False" ' var_Note.PartHOffset(1) = -16 oG2antt.TemplateDef = "dim var_Note" oG2antt.TemplateDef = var_Note oG2antt.Template = "var_Note.PartHOffset(1) = -16" ' var_Note.PartVOffset(1) = 4 oG2antt.TemplateDef = "dim var_Note" oG2antt.TemplateDef = var_Note oG2antt.Template = "var_Note.PartVOffset(1) = 4" var_Note1 = var_Notes.Add("1F",oG2antt.Items.ItemByIndex(1),"1","<%m3%>-<%d%>") var_Note1.RelativePosition = 1 ' var_Note1.PartShadow(1) = .f. oG2antt.TemplateDef = "dim var_Note1" oG2antt.TemplateDef = var_Note1 oG2antt.Template = "var_Note1.PartShadow(1) = False" ' var_Note1.PartHOffset(1) = 16 oG2antt.TemplateDef = "dim var_Note1" oG2antt.TemplateDef = var_Note1 oG2antt.Template = "var_Note1.PartHOffset(1) = 16" ' var_Note1.PartVOffset(1) = -4 oG2antt.TemplateDef = "dim var_Note1" oG2antt.TemplateDef = var_Note1 oG2antt.Template = "var_Note1.PartVOffset(1) = -4" var_CopyTo = oG2antt.CopyTo("C:\Temp\Preview.pdf|11.69 in x 16.53 in") ? "Look for C:\Temp\Preview.pd file." oG2antt.EndUpdate() |
1741 |
How can I specify the grouping strategy, ie numbers from 1 to 5 are given the value (1-5) and grouping is done on this new value
' Occurs after a new Group Item has been inserted to Items collection. function AddGroupItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items ' var_Items.ItemBold(Item) = .t. oG2antt.TemplateDef = "dim var_Items,Item" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = Item oG2antt.Template = "var_Items.ItemBold(Item) = True" var_Items.AddBar(Item,"Summary",var_Items.CellValue(Item,1),var_Items.CellValue(Item,2)) var_Items.DefineSummaryBars(Item,"",-3,"") end function Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Column2 as P Dim var_Columns as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.AllowGroupBy = .t. oG2antt.SortBarVisible = .t. oG2antt.MarkSearchColumn = .f. var_Columns = oG2antt.Columns var_Columns.Add("Tasks") var_Column = var_Columns.Add("Start") ' var_Column.Def(18) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 1" var_Column.AllowGroupBy = .f. var_Column1 = var_Columns.Add("End") ' var_Column1.Def(18) = 2 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 2" var_Column1.AllowGroupBy = .f. var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {09/20/2006} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 256 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 256" var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. var_Items.AddBar(var_Items.AddItem("1"),"Task",{09/21/2006},{09/27/2006}) var_Items.AddBar(var_Items.AddItem("1"),"Task",{09/22/2006},{09/28/2006}) var_Items.AddBar(var_Items.AddItem("2"),"Task",{09/22/2006},{09/28/2006}) var_Items.AddBar(var_Items.AddItem("2"),"Task",{09/23/2006},{09/29/2006}) var_Items.AddBar(var_Items.AddItem("3"),"Task",{09/25/2006},{09/29/2006}) var_Items.AddBar(var_Items.AddItem("3"),"Task",{09/26/2006},{09/30/2006}) var_Column2 = oG2antt.Columns.Add("Tasks - Group") var_Column2.Visible = .f. var_Column2.FormatColumn = "%0 in (1,2) ? `1 - 2` : `3 -`" var_Column2.SortOrder = 1 oG2antt.EndUpdate() |
1740 |
How can I filter the chart and its content, not the items section
' Fired when right mouse button is clicked function RClick as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Columns.Item("Start").ShowFilter("-1,-1,128,128") end function Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Columns as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.SortBarVisible = .t. oG2antt.MarkSearchColumn = .f. var_Columns = oG2antt.Columns var_Columns.Add("Tasks") var_Column = var_Columns.Add("Start") ' var_Column.Def(18) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 1" var_Column.DisplayFilterDate = .t. var_Column.DisplayFilterPattern = .f. var_Column.FilterList = 8448 'exShowExclude + exShowCheckBox var_Column.Visible = .f. var_Column1 = var_Columns.Add("End") ' var_Column1.Def(18) = 2 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 2" var_Column1.DisplayFilterDate = .t. var_Column1.DisplayFilterPattern = .f. var_Column1.Visible = .f. var_Column1.FilterList = 8448 'exShowExclude + exShowCheckBox var_Column1.Visible = .f. var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {09/20/2006} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 128" var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{09/21/2006},{09/27/2006}) var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{09/22/2006},{09/28/2006}) var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{09/22/2006},{09/28/2006}) var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{09/23/2006},{09/29/2006}) var_Items.AddBar(var_Items.AddItem("Task 5"),"Task",{09/25/2006},{09/29/2006}) var_Items.AddBar(var_Items.AddItem("Task 6"),"Task",{09/26/2006},{09/30/2006}) oG2antt.EndUpdate() |
1739 |
How do I enable the Group-By feature
' Occurs after a new Group Item has been inserted to Items collection. function AddGroupItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Chart as local Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items ' var_Items.ItemBackColor(Item) = 15790320 oG2antt.TemplateDef = "dim var_Items,Item" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = Item oG2antt.Template = "var_Items.ItemBackColor(Item) = 15790320" ' oG2antt.Chart.ItemBackColor(Item) = 15790320 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "Me.Chart.ItemBackColor(Item) = 15790320" ' var_Items.ItemDividerLine(Item) = 0 oG2antt.TemplateDef = "dim var_Items,Item" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = Item oG2antt.Template = "var_Items.ItemDividerLine(Item) = 0" var_Items.AddBar(Item,"Summary",var_Items.CellValue(Item,1),var_Items.CellValue(Item,2)) var_Items.DefineSummaryBars(Item,"",-3,"") end function Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Columns as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.AllowGroupBy = .t. oG2antt.SortBarVisible = .t. oG2antt.MarkSearchColumn = .f. var_Columns = oG2antt.Columns var_Columns.Add("Tasks") var_Column = var_Columns.Add("Start") ' var_Column.Def(18) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 1" var_Column.AllowGroupBy = .f. var_Column1 = var_Columns.Add("End") ' var_Column1.Def(18) = 2 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 2" var_Column1.AllowGroupBy = .f. var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {09/20/2006} var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 256 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 256" var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{09/21/2006},{09/27/2006}) var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{09/22/2006},{09/28/2006}) var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{09/22/2006},{09/28/2006}) var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{09/23/2006},{09/29/2006}) var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{09/25/2006},{09/29/2006}) var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{09/26/2006},{09/30/2006}) oG2antt.Columns.Item(0).SortOrder = 1 oG2antt.EndUpdate() |
1738 |
Is there any method to know number/length/count/duration of working days in a bar ( excluding non-working days)
' Fired after a new item has been selected. function SelectionChanged as v () Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items ? var_Items.CellCaption(var_Items.FocusItem,0) ? var_Items.ItemBar(var_Items.FocusItem,"",258) end function Dim h as N Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.SelBackColor = 16760462 oG2antt.SelForeColor = 0 var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 96 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 96" var_Chart.FirstVisibleDate = {01/01/2002} var_Bar = var_Chart.Bars.Add("Task:Split") var_Bar.Shortcut = "Task" ' var_Bar.Def(3) = "<%=%258%><font ;6><off 3>w/units" oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(3) = `<%=%258%><font ;6><off 3>w/units`" ' var_Bar.Def(4) = 18 oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(4) = 18" var_Chart.SelBackColor = oG2antt.SelBackColor oG2antt.Columns.Add("Task") var_Items = oG2antt.Items h = var_Items.AddItem("Task A") var_Items.AddBar(h,"Task",{01/02/2002},{01/09/2002}) h = var_Items.AddItem("Task B") var_Items.AddBar(h,"Task",{01/03/2002},{01/08/2002}) ' var_Items.SelectItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.SelectItem(h) = True" h = var_Items.AddItem("Task C") var_Items.AddBar(h,"Task",{01/04/2002},{01/05/2002}) oG2antt.EndUpdate() |
1737 |
How do i verify weather specified unit is Nonworking Working Unit
' Occurs when the user moves the mouse. function MouseMove as v (Button as N,Shift as N,X as OLE::Exontrol.G2antt.1::OLE_XPOS_PIXELS,Y as OLE::Exontrol.G2antt.1::OLE_YPOS_PIXELS) Dim d as Dim h as N oG2antt = topparent:CONTROL_ACTIVEX1.activex h = oG2antt.ItemFromPoint(-1,-1,c,hit) d = oG2antt.Chart.DateFromPoint(-1,-1) ? d ? oG2antt.Chart.IsNonworkingDate(d,h) end function Dim h as N Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("NonWorking") var_Chart = oG2antt.Chart var_Chart.FirstWeekDay = 1 var_Chart.FirstVisibleDate = {01/24/2008} ' var_Chart.PaneWidth(.f.) = 64 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 64" var_Chart.LevelCount = 2 var_Items = oG2antt.Items h = var_Items.AddItem("Default") h = var_Items.AddItem("January") ' var_Items.ItemNonworkingUnits(h,.f.) = "month(value) = 1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemNonworkingUnits(h,False) = `month(value) = 1`" h = var_Items.AddItem("February, Saturday, Sunday") ' var_Items.ItemNonworkingUnits(h,.f.) = "month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemNonworkingUnits(h,False) = `month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)`" h = var_Items.AddItem("Sunday") ' var_Items.ItemNonworkingUnits(h,.f.) = "weekday(value) = 0" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemNonworkingUnits(h,False) = `weekday(value) = 0`" oG2antt.EndUpdate() |
1736 |
How can I specify the bar's caption to be caption from a column/cell
' Occurs when the user changes the cell's content. function Change as v (Item as OLE::Exontrol.G2antt.1::HITEM,ColIndex as N,NewValue as A) oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Refresh() end function Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_Editor as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {01/01/2001} ' var_Chart.PaneWidth(.f.) = 64 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 64" var_Bar = var_Chart.Bars.Item("Task") ' var_Bar.Def(3) = "<fgcolor=808080><%=%C0%>" oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(3) = `<fgcolor=808080><%=%C0%>`" ' var_Bar.Def(4) = 18 oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(4) = 18" var_Editor = oG2antt.Columns.Add("Task").Editor var_Editor.EditType = 3 var_Editor.AddItem(1,"Aka") var_Editor.AddItem(2,"Baka") var_Editor.AddItem(3,"Taka") var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem(1),"Task",{01/02/2001},{01/05/2001}) var_Items.AddBar(var_Items.AddItem(2),"Task",{01/03/2001},{01/06/2001}) var_Items.AddBar(var_Items.AddItem(3),"Task",{01/04/2001},{01/07/2001}) oG2antt.EndUpdate() |
1735 |
The histogram values displayed on the chart are using 2 decimal places. Can this be formated to just 0 decimal place, so 86.79% becomes 87%
Dim h1 as N Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_Column as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Tasks") var_Column = oG2antt.Columns.Add("Effort") ' var_Column.Def(18) = 21 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 21" var_Column.Editor.EditType = 4 var_Chart = oG2antt.Chart var_Chart.LevelCount = 2 var_Chart.NonworkingDays = 0 ' var_Chart.PaneWidth(.f.) = 96 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 96" var_Chart.FirstVisibleDate = {06/20/2005} var_Chart.HistogramVisible = .t. var_Chart.HistogramHeight = 128 var_Chart.HistogramView = 112 var_Bar = var_Chart.Bars.Item("Task") var_Bar.HistogramPattern = var_Bar.Pattern var_Bar.HistogramType = 0 var_Bar.HistogramCriticalValue = 3 var_Bar.ShowHistogramValues = "value>3?255:1" var_Bar.HistogramItems = -11 var_Bar.HistogramGridLinesColor = 12632256 var_Bar.HistogramRulerLinesColor = 65536 var_Bar.FormatHistogramValues = "(value format `0`) + ` units`" var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. h1 = var_Items.AddItem("Task 1") var_Items.AddBar(h1,"Task",{06/21/2005},{06/23/2005}) ' var_Items.CellValue(h1,1) = 6.79 oG2antt.TemplateDef = "dim var_Items,h1" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h1 oG2antt.Template = "var_Items.CellValue(h1,1) = 6.79" h1 = var_Items.AddItem("Task 2") var_Items.AddBar(h1,"Task",{06/24/2005},{06/26/2005}) ' var_Items.CellValue(h1,1) = 3.19 oG2antt.TemplateDef = "dim var_Items,h1" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h1 oG2antt.Template = "var_Items.CellValue(h1,1) = 3.19" h1 = var_Items.AddItem("Task 3") var_Items.AddBar(h1,"Task",{06/27/2005},{06/29/2005}) ' var_Items.CellValue(h1,1) = 2 oG2antt.TemplateDef = "dim var_Items,h1" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h1 oG2antt.Template = "var_Items.CellValue(h1,1) = 2" h1 = var_Items.AddItem("Task 4") var_Items.AddBar(h1,"Task",{06/30/2005},{07/02/2005}) ' var_Items.CellValue(h1,1) = 1 oG2antt.TemplateDef = "dim var_Items,h1" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h1 oG2antt.Template = "var_Items.CellValue(h1,1) = 1" oG2antt.EndUpdate() |
1734 |
How can I create a relative time-scale
Dim h as N Dim hChild as N Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_Chart1 as local Dim var_Items as P Dim var_Level as P Dim var_Level1 as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.DefaultItemHeight = 24 oG2antt.HeaderHeight = oG2antt.DefaultItemHeight oG2antt.GridLineStyle = 48 oG2antt.DrawGridLines = -1 oG2antt.LinesAtRoot = 0 oG2antt.BackColorLevelHeader = oG2antt.BackColor var_Chart = oG2antt.Chart var_Chart.DrawGridLines = -1 var_Chart.GridLineStyle = 48 ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.LevelCount = 2 var_Chart.FirstVisibleDate = 0 var_Chart.NonworkingDays = 0 var_Chart.UnitWidth = 36 var_Level = var_Chart.Level(0) var_Level.Unit = 4096 var_Level.Count = 6 var_Level.Alignment = 1 var_Level.Label = "<%i%>" var_Level.FormatLabel = "'<b>' + ( (value / 6) array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') ) + '-16'" var_Level1 = var_Chart.Level(1) var_Level1.Label = "<%i%>" var_Level1.FormatLabel = "1 + value mod 6 + ` `" var_Level1.Alignment = 2 var_Chart.AdjustLevelsToBase = .t. ' var_Chart.ScrollRange(0) = 0 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.ScrollRange(0) = 0" ' var_Chart.ScrollRange(1) = 95 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.ScrollRange(1) = 95" var_Bar = var_Chart.Bars.Item("Task") var_Bar.Height = 15 var_Bar.Color = 11851260 var_Bar.Pattern = 1 ' var_Bar.Def(3) = "date blocking" oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(3) = `date blocking`" oG2antt.Columns.Add("Company") var_Items = oG2antt.Items h = var_Items.AddItem("ABC Company") ' var_Items.ItemBackColor(h) = 15790320 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBackColor(h) = 15790320" ' oG2antt.Chart.ItemBackColor(h) = 15790320 var_Chart1 = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart1" oG2antt.TemplateDef = var_Chart1 oG2antt.Template = "Me.Chart.ItemBackColor(h) = 15790320" hChild = var_Items.InsertItem(h,,"line 1") var_Items.AddBar(hChild,"Task",0,3) hChild = var_Items.InsertItem(h,,"line 2") var_Items.AddBar(hChild,"Task",3,5,"A") var_Items.AddBar(hChild,"Task",7,10,"B") hChild = var_Items.InsertItem(h,,"line 3") var_Items.AddBar(hChild,"Task",5,8,"A") var_Items.AddBar(hChild,"Task",9,12,"B") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" oG2antt.EndUpdate() |
1733 |
Extending the bar's visual appearance with additional objects, EBNs, using the exBarBackgroundExt and exBarBackgroundExtInflate
Dim h as N Dim oG2antt as P Dim var_Appearance as P Dim var_Bar as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.DefaultItemHeight = 32 var_Appearance = oG2antt.VisualAppearance var_Appearance.Add(1,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYEDGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XzAcj3dbmAYJQzBJLxKSIDwCd6NXrCOJ5HhWDzjQjJMozLC8YiPG6fZRbeT4ToGNdXYhJWiyLiFeYtVzSMj1fD9Ir/EakbLtey4Lq2A53RzdHThSQpCwPA4BgIA=") var_Appearance.Add(2,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYEDGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NrXHZ9YwTOC5IDke67cr2J53XZAd4QTb2Cz7QC8QAvDA7awafM1MSuHIcOw/AqTYDkTq4XjODYhTDEc4zPLcFx/I6haBoWCSLi+T5VVrRMo1TKtRxnNaubZqO5aRrGe5NW6EXThSQpCr+f4BgIA=") var_Appearance.Add(3,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYEDGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaEZLwLB7dwaf6IQLiWLYHiAAYZRKTcxlDI8AwvFaaZjnWA5ZaOMZBU7RNRyHR9IyTDaWaTqeqbHIuJ4FUzaNY2fZrOz2F6FAA6cKSFIWFYVAMBA") var_Appearance.Add(4,"gBFLBCJwBAEHhEJAADhABb8IQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYEDGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaEZLwLB7dwaf6IQLiWLYHiAAYBIbJI5yeb5Hx3HqfZjbeSxVoML43SzHcByGRcTwzC6pYjrGoZJpWZ4ZQrbNR3DZ8VzzNTrQxIUhYVhUAkB") var_Appearance.RenderType = -16777216 var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 164 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 164" var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.NonworkingDaysColor = 15790320 var_Chart.NonworkingDaysPattern = 6 var_Bar = var_Chart.Bars.Item("Task") var_Bar.Height = 17 var_Bar.Color = 16777215 var_Bar.Pattern = 1 ' var_Bar.Def(51) = 1 oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(51) = 1" oG2antt.Columns.Add("Column") var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Task"),"Task",{01/02/2001},{01/06/2001},"") h = var_Items.AddItem("Task+Rhombus(red)") var_Items.AddBar(h,"Task",{01/02/2001},{01/07/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(100%-11,50%-6,11,11),back=0x10000FF]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(100%-11,50%-6,11,11),back=0x10000FF]`" ' var_Items.ItemBar(h,"",55) = ",,5" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = `,,5`" h = var_Items.AddItem("Rhombus(red)+Task") var_Items.AddBar(h,"Task",{01/02/2001},{01/08/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(0,50%-6,11,11),back=0x10000FF]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(0,50%-6,11,11),back=0x10000FF]`" ' var_Items.ItemBar(h,"",55) = "-5" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = `-5`" h = var_Items.AddItem("Task(yellow)+Rhombus(blue)") var_Items.AddBar(h,"Task",{01/02/2001},{01/09/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(100%-11,50%-6,11,11),back=0x1FF0000]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(100%-11,50%-6,11,11),back=0x1FF0000]`" ' var_Items.ItemBar(h,"",55) = ",,5" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = `,,5`" ' var_Items.ItemBar(h,"",33) = 65535 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 65535" h = var_Items.AddItem("Rhombus(blue)+Task(yellow)") var_Items.AddBar(h,"Task",{01/02/2001},{01/08/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(0,50%-6,11,11),back=0x1FF0000]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(0,50%-6,11,11),back=0x1FF0000]`" ' var_Items.ItemBar(h,"",55) = "-5" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = `-5`" ' var_Items.ItemBar(h,"",33) = 65535 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 65535" h = var_Items.AddItem("TriangleUp(white)+Task") var_Items.AddBar(h,"Task",{01/02/2001},{01/07/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(0,50%-6,11,11),back=0x2FFFFFF]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(0,50%-6,11,11),back=0x2FFFFFF]`" ' var_Items.ItemBar(h,"",55) = "-5" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = `-5`" h = var_Items.AddItem("TriangleUp(blue)+Task(magenta)+TriangleDown(red)") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(0,50%-6,11,11),back=0x02FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(0,50%-6,11,11),back=0x02FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]`" ' var_Items.ItemBar(h,"",55) = "-5,0,5,0" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = `-5,0,5,0`" ' var_Items.ItemBar(h,"",33) = 16744703 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 16744703" h = var_Items.AddItem("Rhombus+Task+TriangleDown") var_Items.AddBar(h,"Task",{01/02/2001},{01/07/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(0,50%-6,11,11),back=0x01FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(0,50%-6,11,11),back=0x01FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]`" ' var_Items.ItemBar(h,"",55) = "-5, 0,5,0" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = `-5, 0,5,0`" ' var_Items.ItemBar(h,"",33) = 16744448 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 16744448" h = var_Items.AddItem("Rhombus+Task+TriangleDown") var_Items.AddBar(h,"Task",{01/02/2001},{01/08/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(50%-6,0,11,11),back=0x01FF0000],none[(50%-6,100%-11,11,11),back=0x010000FF]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(50%-6,0,11,11),back=0x01FF0000],none[(50%-6,100%-11,11,11),back=0x010000FF]`" ' var_Items.ItemBar(h,"",55) = "0,-5,0,5" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = `0,-5,0,5`" h = var_Items.AddItem("Task+Star") var_Items.AddBar(h,"Task",{01/02/2001},{01/09/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(100%-11,0,11,11),back=0x4FFFFFF]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(100%-11,0,11,11),back=0x4FFFFFF]`" ' var_Items.ItemBar(h,"",55) = 5 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = 5" h = var_Items.AddItem("Star+Task") var_Items.AddBar(h,"Task",{01/02/2001},{01/08/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(0,100%-11,11,11),back=0x04FFFFFF]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(0,100%-11,11,11),back=0x04FFFFFF]`" ' var_Items.ItemBar(h,"",55) = 5 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = 5" h = var_Items.AddItem("Task+Star") var_Items.AddBar(h,"Task",{01/02/2001},{01/07/2001},"") ' var_Items.ItemBar(h,"",53) = "none[(100%-11,0,11,11),back=0x4FFFFFF]" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,53) = `none[(100%-11,0,11,11),back=0x4FFFFFF]`" ' var_Items.ItemBar(h,"",55) = "0,-6,14" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,55) = `0,-6,14`" oG2antt.EndUpdate() |
1732 |
I am using the ItemBar(exBarFrameColor) to display an additional EBN on the current bar. The problem is that I still need a black frame around the bar. How can I achieve that
Dim h as N Dim oG2antt as P Dim var_Appearance as P Dim var_Bar as local Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Appearance = oG2antt.VisualAppearance var_Appearance.Add(1,"gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBRhwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODDMRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA") var_Appearance.Add(2,"CP:1 0 0 5 0") var_Appearance.Add(3,"gBFLBCJwBAEHhEJAADhABUEIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEgYRoiAYhXDiHwxARHUgRfIEOwHDiBZomWKZEiaKIqRrLMryFLMZx3CqcAApGaqHiOCYlSbTcoyfJYZBzD6mKJpWipWheW48U7PVRDJSkNysASZIyrGKqJouX4WR7BcZgNR4YBgEoWRouSBLWrgNIVR6/eBABZFPzbNK3ZzdOIIJgEgIA=") var_Appearance.RenderType = -16777216 var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 164 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 164" var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.Bars.Item("Task").Color = 67043328 ' var_Chart.Bars.Copy("Task","NewTask").Height = 15 var_Bar = var_Chart.Bars.Copy("Task","NewTask") oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Height = 15" oG2antt.Columns.Add("Column") var_Items = oG2antt.Items h = var_Items.AddItem("Task") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) var_Items.AddBar(h,"NewTask",{01/08/2001},{01/12/2001},"new") h = var_Items.AddItem("Task+Rhombus") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33554432 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33554432" var_Items.AddBar(h,"NewTask",{01/08/2001},{01/12/2001},"new") ' var_Items.ItemBar(h,"new",51) = 33554432 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`new`,51) = 33554432" h = var_Items.AddItem("Task/Color+Rhombus") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33554687 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33554687" ' var_Items.ItemBar(h,"",33) = 65280 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 65280" var_Items.AddBar(h,"NewTask",{01/08/2001},{01/12/2001},"new") ' var_Items.ItemBar(h,"new",51) = 33554687 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`new`,51) = 33554687" ' var_Items.ItemBar(h,"new",33) = 65280 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`new`,33) = 65280" h = var_Items.AddItem("Task/Color+Rhombus/Color") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33619712 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33619712" ' var_Items.ItemBar(h,"",33) = 16711935 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 16711935" var_Items.AddBar(h,"NewTask",{01/08/2001},{01/12/2001},"new") ' var_Items.ItemBar(h,"new",51) = 33619712 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`new`,51) = 33619712" ' var_Items.ItemBar(h,"new",33) = 16711935 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,`new`,33) = 16711935" oG2antt.EndUpdate() |
1731 |
I am using EBN objects to show my bars, but when apply a color to the EBN looks darker. Is it possible to get the same color brightness
Dim h as N Dim oG2antt as P Dim var_Appearance as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Appearance = oG2antt.VisualAppearance var_Appearance.Add(1,"gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5IjqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLDI4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI") var_Appearance.Add(2,"CP:1 -6 0 0 0") var_Appearance.RenderType = -16777216 var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 164 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 164" var_Chart.FirstVisibleDate = {01/01/2001} oG2antt.Columns.Add("Column") var_Items = oG2antt.Items h = var_Items.AddItem("Task") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) h = var_Items.AddItem("Task+Rhombus") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33554432 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33554432" h = var_Items.AddItem("Task/Color+Rhombus") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33554687 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33554687" ' var_Items.ItemBar(h,"",33) = 65280 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 65280" h = var_Items.AddItem("Task/Color+Rhombus/Color") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33619712 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33619712" ' var_Items.ItemBar(h,"",33) = 16711935 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 16711935" oG2antt.EndUpdate() |
1730 |
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the start shape color
Dim h as N Dim oG2antt as P Dim var_Appearance as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Appearance = oG2antt.VisualAppearance var_Appearance.Add(1,"gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5IjqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLDI4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI") var_Appearance.Add(2,"CP:1 -6 0 0 0") var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 164 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 164" var_Chart.FirstVisibleDate = {01/01/2001} oG2antt.Columns.Add("Column") var_Items = oG2antt.Items h = var_Items.AddItem("Task") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) h = var_Items.AddItem("Task+Rhombus") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33554432 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33554432" h = var_Items.AddItem("Task/Color+Rhombus") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33554432 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33554432" ' var_Items.ItemBar(h,"",33) = 65280 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 65280" h = var_Items.AddItem("Task/Color+Rhombus/Color") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33619712 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33619712" ' var_Items.ItemBar(h,"",33) = 16711935 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 16711935" oG2antt.EndUpdate() |
1729 |
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the end shape color
Dim h as N Dim oG2antt as P Dim var_Appearance as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Appearance = oG2antt.VisualAppearance var_Appearance.Add(1,"gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBRhwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODDMRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA") var_Appearance.Add(2,"CP:1 0 0 6 0") var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 164 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 164" var_Chart.FirstVisibleDate = {01/01/2001} oG2antt.Columns.Add("Column") var_Items = oG2antt.Items h = var_Items.AddItem("Task") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) h = var_Items.AddItem("Task+Rhombus") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33554432 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33554432" h = var_Items.AddItem("Task/Color+Rhombus") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33554432 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33554432" ' var_Items.ItemBar(h,"",33) = 65280 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 65280" h = var_Items.AddItem("Task/Color+Rhombus/Color") var_Items.AddBar(h,"Task",{01/02/2001},{01/06/2001}) ' var_Items.ItemBar(h,"",51) = 33619712 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,51) = 33619712" ' var_Items.ItemBar(h,"",33) = 16711935 oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBar(h,``,33) = 16711935" oG2antt.EndUpdate() |
1728 |
Is it possible to resize a column with the mouse without changing the width of the next column
Dim oG2antt as P Dim var_Column as local Dim var_Column1 as local oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.ColumnAutoResize = .f. ' oG2antt.Columns.Add("Column 1").Width = 256 var_Column = oG2antt.Columns.Add("Column 1") oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Width = 256" ' oG2antt.Columns.Add("Column 2").Width = 512 var_Column1 = oG2antt.Columns.Add("Column 2") oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Width = 512" oG2antt.DrawGridLines = -1 oG2antt.EndUpdate() |
1727 |
How can I align captions of items with checkbox, with items with no checkbox
Dim oG2antt as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Columns.Add("Default") var_Items = oG2antt.Items ' var_Items.CellImages(var_Items.AddItem(0),0) = "1" oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.CellImages(AddItem(0),0) = `1`" ' var_Items.CellHasCheckBox(var_Items.AddItem(1),0) = .t. oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.CellHasCheckBox(AddItem(1),0) = True" ' var_Items.CellImages(var_Items.AddItem(2),0) = "1" oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.CellImages(AddItem(2),0) = `1`" oG2antt.EndUpdate() |
1726 |
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items
' Occurs after a new Group Item has been inserted to Items collection. function AddGroupItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Summary",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) var_Items.DefineSummaryBars(Item,"",-3,"") end function ' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function ' Occurs when column's position or column's size is changed. function LayoutChanged as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Refresh() end function Dim oG2antt as P Dim rs as P Dim var_Chart as local Dim var_Column as P Dim var_Column1 as P Dim var_Columns as local Dim var_Columns1 as local Dim var_ConditionalFormat as local Dim var_ConditionalFormat1 as local oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} ' oG2antt.Chart.PaneWidth(.f.) = 312 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 312" oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.Items.AllowCellValueToItemBar = .t. ' oG2antt.Columns.Item(2).Def(18) = 1 var_Columns = oG2antt.Columns.Item(2) oG2antt.TemplateDef = "dim var_Columns" oG2antt.TemplateDef = var_Columns oG2antt.Template = "var_Columns.Def(18) = 1" ' oG2antt.Columns.Item(4).Def(18) = 2 var_Columns1 = oG2antt.Columns.Item(4) oG2antt.TemplateDef = "dim var_Columns1" oG2antt.TemplateDef = var_Columns1 oG2antt.Template = "var_Columns1.Def(18) = 2" oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Columns.Item(1).SortOrder = 1 var_Column = oG2antt.Columns.Add("Position") var_Column.FormatColumn = "(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))" var_Column.Visible = .f. var_Column1 = oG2antt.Columns.Add("Position") var_Column1.FormatColumn = "(1 rpos '') contains '.'" var_Column1.Visible = .f. ' oG2antt.ConditionalFormats.Add("(%C13 mod 2) != 0").BackColor = 15790320 var_ConditionalFormat = oG2antt.ConditionalFormats.Add("(%C13 mod 2) != 0") oG2antt.TemplateDef = "dim var_ConditionalFormat" oG2antt.TemplateDef = var_ConditionalFormat oG2antt.Template = "var_ConditionalFormat.BackColor = 15790320" ' oG2antt.ConditionalFormats.Add("%C14 = 0").BackColor = 12500670 var_ConditionalFormat1 = oG2antt.ConditionalFormats.Add("%C14 = 0") oG2antt.TemplateDef = "dim var_ConditionalFormat1" oG2antt.TemplateDef = var_ConditionalFormat1 oG2antt.Template = "var_ConditionalFormat1.BackColor = 12500670" oG2antt.EndUpdate() |
1725 |
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )
Dim oG2antt as P Dim var_Chart as local Dim var_Column as local Dim var_Column1 as P Dim var_Column2 as P Dim var_Editor as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() ' oG2antt.Chart.PaneWidth(.t.) = 0 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(True) = 0" oG2antt.HeaderAppearance = 4 oG2antt.HeaderHeight = 24 oG2antt.ScrollBySingleLine = .t. oG2antt.DrawGridLines = -2 ' oG2antt.Columns.Add("Value").Def(17) = 1 var_Column = oG2antt.Columns.Add("Value") oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(17) = 1" var_Column1 = oG2antt.Columns.Add("FormatColumn = `%0` ~ CellValue") var_Column1.FormatColumn = "%0" ' var_Column1.Def(16) = .f. oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(16) = False" var_Column2 = oG2antt.Columns.Add("FormatColumn = `%C0`~ CellCaption") var_Column2.FormatColumn = "%C0" ' var_Column2.Def(16) = .f. oG2antt.TemplateDef = "dim var_Column2" oG2antt.TemplateDef = var_Column2 oG2antt.Template = "var_Column2.Def(16) = False" var_Items = oG2antt.Items var_Items.AddItem(1.1234) ' var_Items.CellValueFormat(var_Items.AddItem("<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>."),0) = 1 oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.CellValueFormat(AddItem(`<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>.`),0) = 1" var_Editor = var_Items.CellEditor(var_Items.AddItem(3)) var_Editor.EditType = 6 var_Editor.AddItem(1,"Border") var_Editor.AddItem(2,"Thick") var_Editor.AddItem(4,"Shadow") ' var_Items.FormatCell(var_Items.AddItem(10000),0) = "`<b>` + currency(value)" oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.FormatCell(AddItem(10000),0) = ```<b>`` + currency(value)`" oG2antt.EndUpdate() |
1724 |
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color
' Occurs after a new Group Item has been inserted to Items collection. function AddGroupItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Summary",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) var_Items.DefineSummaryBars(Item,"",-3,"") end function ' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function ' Occurs when column's position or column's size is changed. function LayoutChanged as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Refresh() end function Dim oG2antt as P Dim rs as P Dim var_Chart as local Dim var_Column as P Dim var_Column1 as P Dim var_Columns as local Dim var_Columns1 as local Dim var_ConditionalFormat as local Dim var_ConditionalFormat1 as local oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} ' oG2antt.Chart.PaneWidth(.f.) = 312 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 312" oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.Items.AllowCellValueToItemBar = .t. ' oG2antt.Columns.Item(2).Def(18) = 1 var_Columns = oG2antt.Columns.Item(2) oG2antt.TemplateDef = "dim var_Columns" oG2antt.TemplateDef = var_Columns oG2antt.Template = "var_Columns.Def(18) = 1" ' oG2antt.Columns.Item(4).Def(18) = 2 var_Columns1 = oG2antt.Columns.Item(4) oG2antt.TemplateDef = "dim var_Columns1" oG2antt.TemplateDef = var_Columns1 oG2antt.Template = "var_Columns1.Def(18) = 2" oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Columns.Item(1).SortOrder = 1 var_Column = oG2antt.Columns.Add("Position") var_Column.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))" var_Column.Visible = .f. var_Column1 = oG2antt.Columns.Add("Position") var_Column1.FormatColumn = "(1 rpos '') contains '.'" var_Column1.Visible = .f. ' oG2antt.ConditionalFormats.Add("(%C13 mod 2) != 0").BackColor = 15790320 var_ConditionalFormat = oG2antt.ConditionalFormats.Add("(%C13 mod 2) != 0") oG2antt.TemplateDef = "dim var_ConditionalFormat" oG2antt.TemplateDef = var_ConditionalFormat oG2antt.Template = "var_ConditionalFormat.BackColor = 15790320" ' oG2antt.ConditionalFormats.Add("%C14 = 0").BackColor = 12500670 var_ConditionalFormat1 = oG2antt.ConditionalFormats.Add("%C14 = 0") oG2antt.TemplateDef = "dim var_ConditionalFormat1" oG2antt.TemplateDef = var_ConditionalFormat1 oG2antt.Template = "var_ConditionalFormat1.BackColor = 12500670" oG2antt.EndUpdate() |
1723 |
How can I highlight each group header, with a different background color (method 2)
' Occurs after a new Group Item has been inserted to Items collection. function AddGroupItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items ' var_Items.ItemBackColor(Item) = 12500670 oG2antt.TemplateDef = "dim var_Items,Item" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = Item oG2antt.Template = "var_Items.ItemBackColor(Item) = 12500670" var_Items.AddBar(Item,"Summary",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) var_Items.DefineSummaryBars(Item,"",-3,"") end function ' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function ' Occurs when column's position or column's size is changed. function LayoutChanged as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Refresh() end function Dim oG2antt as P Dim rs as P Dim var_Chart as local Dim var_Columns as local Dim var_Columns1 as local oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} ' oG2antt.Chart.PaneWidth(.f.) = 312 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 312" oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.Items.AllowCellValueToItemBar = .t. ' oG2antt.Columns.Item(2).Def(18) = 1 var_Columns = oG2antt.Columns.Item(2) oG2antt.TemplateDef = "dim var_Columns" oG2antt.TemplateDef = var_Columns oG2antt.Template = "var_Columns.Def(18) = 1" ' oG2antt.Columns.Item(4).Def(18) = 2 var_Columns1 = oG2antt.Columns.Item(4) oG2antt.TemplateDef = "dim var_Columns1" oG2antt.TemplateDef = var_Columns1 oG2antt.Template = "var_Columns1.Def(18) = 2" oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Columns.Item(1).SortOrder = 1 oG2antt.EndUpdate() |
1722 |
How can I highlight each group header ( not-subroup ), with a different background color (method 1)
' Occurs after a new Group Item has been inserted to Items collection. function AddGroupItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Summary",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) var_Items.DefineSummaryBars(Item,"",-3,"") end function ' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function ' Occurs when column's position or column's size is changed. function LayoutChanged as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Refresh() end function Dim oG2antt as P Dim rs as P Dim var_Chart as local Dim var_Column as P Dim var_Column1 as P Dim var_Columns as local Dim var_Columns1 as local Dim var_ConditionalFormat as local oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} ' oG2antt.Chart.PaneWidth(.f.) = 312 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 312" oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.Items.AllowCellValueToItemBar = .t. ' oG2antt.Columns.Item(2).Def(18) = 1 var_Columns = oG2antt.Columns.Item(2) oG2antt.TemplateDef = "dim var_Columns" oG2antt.TemplateDef = var_Columns oG2antt.Template = "var_Columns.Def(18) = 1" ' oG2antt.Columns.Item(4).Def(18) = 2 var_Columns1 = oG2antt.Columns.Item(4) oG2antt.TemplateDef = "dim var_Columns1" oG2antt.TemplateDef = var_Columns1 oG2antt.Template = "var_Columns1.Def(18) = 2" oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Columns.Item(1).SortOrder = 1 var_Column = oG2antt.Columns.Add("Position") var_Column.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))" var_Column.Visible = .f. var_Column1 = oG2antt.Columns.Add("Position") var_Column1.FormatColumn = "(1 rpos '') contains '.'" var_Column1.Visible = .f. ' oG2antt.ConditionalFormats.Add("%C14 = 0").BackColor = 12500670 var_ConditionalFormat = oG2antt.ConditionalFormats.Add("%C14 = 0") oG2antt.TemplateDef = "dim var_ConditionalFormat" oG2antt.TemplateDef = var_ConditionalFormat oG2antt.Template = "var_ConditionalFormat.BackColor = 12500670" oG2antt.EndUpdate() |
1721 |
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add
' Occurs when column's position or column's size is changed. function LayoutChanged as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Refresh() end function ' Fired when the control sorts a column. function Sort as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Refresh() end function Dim h as N Dim oG2antt as P Dim var_Chart as local Dim var_Column as P Dim var_Column1 as P Dim var_Column2 as P Dim var_ConditionalFormat as local Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.LinesAtRoot = -1 var_Column = oG2antt.Columns.Add("P1") ' var_Column.Def(0) = .t. oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(0) = True" var_Column.PartialCheck = .t. ' oG2antt.Chart.PaneWidth(.t.) = 0 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(True) = 0" var_Column1 = oG2antt.Columns.Add("P2") ' var_Column1.Def(0) = .t. oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(0) = True" var_Column1.PartialCheck = .t. var_Items = oG2antt.Items h = var_Items.AddItem("Root 1") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" h = var_Items.AddItem("Root 2") var_Items.InsertItem(h,,"Child 1") var_Items.InsertItem(h,,"Child 2") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" var_Column2 = oG2antt.Columns.Add("Position") var_Column2.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))" var_Column2.Visible = .f. ' oG2antt.ConditionalFormats.Add("(%C2 mod 2) != 0").BackColor = 15790320 var_ConditionalFormat = oG2antt.ConditionalFormats.Add("(%C2 mod 2) != 0") oG2antt.TemplateDef = "dim var_ConditionalFormat" oG2antt.TemplateDef = var_ConditionalFormat oG2antt.Template = "var_ConditionalFormat.BackColor = 15790320" oG2antt.EndUpdate() |
1720 |
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on
' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function ' Occurs when column's position or column's size is changed. function LayoutChanged as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Refresh() end function Dim oG2antt as P Dim rs as P Dim var_Chart as local Dim var_Column as P Dim var_Columns as local Dim var_Columns1 as local Dim var_ConditionalFormat as local Dim var_ConditionalFormat1 as local Dim var_ConditionalFormat2 as local Dim var_ConditionalFormat3 as local oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} ' oG2antt.Chart.PaneWidth(.f.) = 312 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 312" oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.Items.AllowCellValueToItemBar = .t. ' oG2antt.Columns.Item(2).Def(18) = 1 var_Columns = oG2antt.Columns.Item(2) oG2antt.TemplateDef = "dim var_Columns" oG2antt.TemplateDef = var_Columns oG2antt.Template = "var_Columns.Def(18) = 1" ' oG2antt.Columns.Item(4).Def(18) = 2 var_Columns1 = oG2antt.Columns.Item(4) oG2antt.TemplateDef = "dim var_Columns1" oG2antt.TemplateDef = var_Columns1 oG2antt.Template = "var_Columns1.Def(18) = 2" oG2antt.Columns.Item(1).SortOrder = 1 var_Column = oG2antt.Columns.Add("Position") var_Column.FormatColumn = "1 apos ''" var_Column.Visible = .f. ' oG2antt.ConditionalFormats.Add("(%C13 mod 5) = 1").BackColor = 8421504 var_ConditionalFormat = oG2antt.ConditionalFormats.Add("(%C13 mod 5) = 1") oG2antt.TemplateDef = "dim var_ConditionalFormat" oG2antt.TemplateDef = var_ConditionalFormat oG2antt.Template = "var_ConditionalFormat.BackColor = 8421504" ' oG2antt.ConditionalFormats.Add("(%C13 mod 5) = 2").BackColor = 10790052 var_ConditionalFormat1 = oG2antt.ConditionalFormats.Add("(%C13 mod 5) = 2") oG2antt.TemplateDef = "dim var_ConditionalFormat1" oG2antt.TemplateDef = var_ConditionalFormat1 oG2antt.Template = "var_ConditionalFormat1.BackColor = 10790052" ' oG2antt.ConditionalFormats.Add("(%C13 mod 5) = 3").BackColor = 12500670 var_ConditionalFormat2 = oG2antt.ConditionalFormats.Add("(%C13 mod 5) = 3") oG2antt.TemplateDef = "dim var_ConditionalFormat2" oG2antt.TemplateDef = var_ConditionalFormat2 oG2antt.Template = "var_ConditionalFormat2.BackColor = 12500670" ' oG2antt.ConditionalFormats.Add("(%C13 mod 5) = 4").BackColor = 15790320 var_ConditionalFormat3 = oG2antt.ConditionalFormats.Add("(%C13 mod 5) = 4") oG2antt.TemplateDef = "dim var_ConditionalFormat3" oG2antt.TemplateDef = var_ConditionalFormat3 oG2antt.Template = "var_ConditionalFormat3.BackColor = 15790320" oG2antt.EndUpdate() |
1719 |
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on
' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function ' Occurs when column's position or column's size is changed. function LayoutChanged as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Refresh() end function Dim oG2antt as P Dim rs as P Dim var_Chart as local Dim var_Column as P Dim var_Columns as local Dim var_Columns1 as local Dim var_ConditionalFormat as local oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} ' oG2antt.Chart.PaneWidth(.f.) = 312 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 312" oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.Items.AllowCellValueToItemBar = .t. ' oG2antt.Columns.Item(2).Def(18) = 1 var_Columns = oG2antt.Columns.Item(2) oG2antt.TemplateDef = "dim var_Columns" oG2antt.TemplateDef = var_Columns oG2antt.Template = "var_Columns.Def(18) = 1" ' oG2antt.Columns.Item(4).Def(18) = 2 var_Columns1 = oG2antt.Columns.Item(4) oG2antt.TemplateDef = "dim var_Columns1" oG2antt.TemplateDef = var_Columns1 oG2antt.Template = "var_Columns1.Def(18) = 2" oG2antt.Columns.Item(1).SortOrder = 1 var_Column = oG2antt.Columns.Add("Position") var_Column.FormatColumn = "1 apos ''" var_Column.Visible = .f. ' oG2antt.ConditionalFormats.Add("(%C13 mod 4) = 0").BackColor = 15790320 var_ConditionalFormat = oG2antt.ConditionalFormats.Add("(%C13 mod 4) = 0") oG2antt.TemplateDef = "dim var_ConditionalFormat" oG2antt.TemplateDef = var_ConditionalFormat oG2antt.Template = "var_ConditionalFormat.BackColor = 15790320" oG2antt.EndUpdate() |
1718 |
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found
' Occurs after a new Group Item has been inserted to Items collection. function AddGroupItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Summary",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) var_Items.DefineSummaryBars(Item,"",-3,"") end function ' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function ' Occurs when column's position or column's size is changed. function LayoutChanged as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.Refresh() end function Dim oG2antt as P Dim rs as P Dim var_Chart as local Dim var_Column as P Dim var_Columns as local Dim var_Columns1 as local Dim var_ConditionalFormat as local oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} ' oG2antt.Chart.PaneWidth(.f.) = 312 var_Chart = oG2antt.Chart oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 312" oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.Items.AllowCellValueToItemBar = .t. ' oG2antt.Columns.Item(2).Def(18) = 1 var_Columns = oG2antt.Columns.Item(2) oG2antt.TemplateDef = "dim var_Columns" oG2antt.TemplateDef = var_Columns oG2antt.Template = "var_Columns.Def(18) = 1" ' oG2antt.Columns.Item(4).Def(18) = 2 var_Columns1 = oG2antt.Columns.Item(4) oG2antt.TemplateDef = "dim var_Columns1" oG2antt.TemplateDef = var_Columns1 oG2antt.Template = "var_Columns1.Def(18) = 2" oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Columns.Item(1).SortOrder = 1 var_Column = oG2antt.Columns.Add("Position") var_Column.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))" var_Column.Visible = .f. ' oG2antt.ConditionalFormats.Add("(%C13 mod 2) != 0").BackColor = 15790320 var_ConditionalFormat = oG2antt.ConditionalFormats.Add("(%C13 mod 2) != 0") oG2antt.TemplateDef = "dim var_ConditionalFormat" oG2antt.TemplateDef = var_ConditionalFormat oG2antt.Template = "var_ConditionalFormat.BackColor = 15790320" oG2antt.EndUpdate() |
1717 |
How do I show the chart's labels in 24-hour clock format
Dim oG2antt as P Dim var_Chart as P Dim var_Level as P Dim var_Level1 as P Dim var_Level2 as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 0 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 0" var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 3 var_Level = var_Chart.Level(0) var_Level.Label = "<%mmm%> <%d%>, <%yyyy%>" var_Level.Alignment = 17 'exHOutside + CenterAlignment var_Level.Unit = 4096 var_Level1 = var_Chart.Level(1) var_Level1.Label = "<b><%h%>:00</b>" var_Level1.Alignment = 1 var_Level1.Unit = 65536 var_Level1.DrawTickLines = .t. var_Level1.DrawGridLines = .t. var_Level2 = var_Chart.Level(2) var_Level2.Label = "<%nn%>" var_Level2.Unit = 1048576 var_Level2.Count = 15 var_Chart.ScrollTo({01/01/2001 08:30:00},0) |
1716 |
How do I show the chart's labels in 12-hour clock format
Dim oG2antt as P Dim var_Chart as P Dim var_Level as P Dim var_Level1 as P Dim var_Level2 as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 0 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 0" var_Chart.FirstVisibleDate = {01/01/2001} var_Chart.LevelCount = 3 var_Level = var_Chart.Level(0) var_Level.Label = "<%mmm%> <%d%>, <%yyyy%>" var_Level.Alignment = 17 'exHOutside + CenterAlignment var_Level.Unit = 4096 var_Level1 = var_Chart.Level(1) var_Level1.Label = "<b><%h%>:00</b> <%AM/PM%>" var_Level1.Alignment = 1 var_Level1.Unit = 65536 var_Level1.DrawTickLines = .t. var_Level1.DrawGridLines = .t. var_Level2 = var_Chart.Level(2) var_Level2.Label = "<%nn%>" var_Level2.Unit = 1048576 var_Level2.Count = 15 var_Chart.ScrollTo({01/01/2001 08:30:00},0) |
1715 |
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done
' Occurs when the user presses and releases an ANSI key. function KeyPress as v (KeyAscii as N) oG2antt = topparent:CONTROL_ACTIVEX1.activex ? "if .Editying != 0 then" ? oG2antt.Editing KeyAscii = 0 end function Dim oG2antt as P Dim var_Chart as P Dim var_Column as P Dim var_Column1 as P Dim var_Columns as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Columns = oG2antt.Columns var_Columns.Add("Tasks") var_Column = var_Columns.Add("Start") ' var_Column.Def(18) = 1 oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(18) = 1" var_Column.Editor.EditType = 7 var_Column1 = var_Columns.Add("End") ' var_Column1.Def(18) = 2 oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Def(18) = 2" var_Column1.Editor.EditType = 7 var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {09/20/2006} var_Chart.AllowLinkBars = .t. var_Chart.AllowCreateBar = 0 var_Chart.LevelCount = 2 ' var_Chart.PaneWidth(.f.) = 196 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 196" var_Items = oG2antt.Items var_Items.AllowCellValueToItemBar = .t. var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{09/21/2006},{09/24/2006}) var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{09/22/2006},{09/25/2006}) var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{09/23/2006},{09/26/2006}) oG2antt.EndUpdate() |
1714 |
When a Day, Week etc is clicked how can we make it centre/zoom the chart to cover all the bars
' Occurs once the user selects a new time scale unit in the overview zoom area. function OverviewZoom as v () Dim var_Chart as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Chart = oG2antt.Chart var_Chart.ScrollTo({01/01/2001},1) ? "Start" ? var_Chart.StartPrintDate ? "End" ? var_Chart.EndPrintDate end function Dim oG2antt as P Dim var_Chart as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.LevelCount = 2 var_Chart.OverviewVisible = 2 var_Chart.AllowOverviewZoom = 1 ' var_Chart.Label(16777216) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(16777216) = ``" ' var_Chart.Label(1048576) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(1048576) = ``" ' var_Chart.Label(65536) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(65536) = ``" var_Chart.UnitScale = 4096 var_Chart.ScrollTo({01/01/2001},1) var_Chart.MarkTimeZone("zone",{01/01/2001},{01/02/2001},10516548) oG2antt.Columns.Add("Default") var_Items = oG2antt.Items var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",{12/15/2000},{01/10/2001}) var_Items.AddBar(var_Items.AddItem("Item 2"),"Task",{01/01/2001},{01/05/2001}) oG2antt.EndUpdate() |
1713 |
The first time we run the application, the day label headers looks different then pressing Week and then Day again on the control's overview part. How do we make to show the header in the same format
Dim oG2antt as P Dim var_Chart as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Chart = oG2antt.Chart ' var_Chart.PaneWidth(.f.) = 128 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 128" var_Chart.LevelCount = 2 var_Chart.OverviewVisible = 2 var_Chart.AllowOverviewZoom = 1 ' var_Chart.Label(16777216) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(16777216) = ``" ' var_Chart.Label(1048576) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(1048576) = ``" ' var_Chart.Label(65536) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(65536) = ``" var_Chart.UnitScale = 4096 |
1712 |
How to sort numerically by columns
Dim oG2antt as P Dim var_Column as local Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() ' oG2antt.Columns.Add("Numeric").SortType = 1 var_Column = oG2antt.Columns.Add("Numeric") oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.SortType = 1" var_Items = oG2antt.Items var_Items.AddItem(1) var_Items.AddItem(2) var_Items.AddItem(12) var_Items.AddItem(22) oG2antt.Columns.Item(0).SortOrder = 1 oG2antt.EndUpdate() |
1711 |
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
' Occurs when the user presses a mouse button. function MouseDown as v (Button as N,Shift as N,X as OLE::Exontrol.G2antt.1::OLE_XPOS_PIXELS,Y as OLE::Exontrol.G2antt.1::OLE_YPOS_PIXELS) ' Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit)) oG2antt = topparent:CONTROL_ACTIVEX1.activex end function Dim oG2antt as P Dim var_Column as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.TreeColumnIndex = -1 oG2antt.SelForeColor = oG2antt.ForeColor var_Column = oG2antt.Columns.Add("Buttons") var_Column.Alignment = 1 ' var_Column.Def(2) = .t. oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Def(2) = True" var_Items = oG2antt.Items var_Items.AddItem("Button A") var_Items.AddItem("Button B") var_Items.AddItem("Button C") oG2antt.EndUpdate() |
1710 |
How do I arrange the levels when the user changes the scale using the control's overview part
' Occurs once the user selects a new time scale unit in the overview zoom area. function OverviewZoom as v () Dim var_Chart as P Dim var_Level as local oG2antt = topparent:CONTROL_ACTIVEX1.activex ? oG2antt.Chart.UnitScale oG2antt.EnsureVisibleColumn(0) var_Chart = oG2antt.Chart ' var_Chart.Level(0).DrawTickLines = 0 var_Level = var_Chart.Level(0) oG2antt.TemplateDef = "dim var_Level" oG2antt.TemplateDef = var_Level oG2antt.Template = "var_Level.DrawTickLines = 0" var_Chart.ScrollTo({11/18/2015},1) end function Dim oG2antt as P Dim var_Chart as P Dim var_Level as P Dim var_Level1 as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {11/18/2015} ' var_Chart.PaneWidth(.f.) = 0 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(False) = 0" var_Chart.LevelCount = 2 var_Chart.DrawLevelSeparator = 2 var_Level = var_Chart.Level(0) var_Level.Alignment = 17 'exHOutside + CenterAlignment var_Level.DrawTickLines = 2 var_Level.BackColor = oG2antt.BackColor var_Level1 = var_Chart.Level(1) var_Level1.DrawTickLines = 65 'exLevelMiddleLine + exLevelDotLine var_Level1.DrawTickLinesFrom(0,2) var_Chart.OverviewVisible = 2 var_Chart.AllowOverviewZoom = 1 var_Chart.UnitWidth = 24 ' var_Chart.Label(16777216) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(16777216) = ``" ' var_Chart.Label(1048576) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(1048576) = ``" ' var_Chart.Label(65536) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(65536) = ``" ' var_Chart.Label(256) = "" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(256) = ``" ' var_Chart.Label(4096) = "<|><%d%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096" oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.Label(4096) = `<|><%d%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096`" var_Chart.UnitScale = 4096 var_Chart.ScrollTo(var_Chart.FirstVisibleDate,1) oG2antt.Columns.Add("Default") oG2antt.EndUpdate() |
1709 |
I am using AllowGroupBy, the question is it is possible to add summary bars for child item, when user do grouping
' Occurs after a new Group Item has been inserted to Items collection. function AddGroupItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Summary",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) var_Items.DefineSummaryBars(Item,"",-3,"") end function ' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function Dim oG2antt as P Dim rs as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Columns.Item(1).SortOrder = 1 oG2antt.EndUpdate() |
1708 |
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 3)
' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function Dim oG2antt as P Dim rs as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Chart.ShowCollapsedBars = .t. oG2antt.EndUpdate() oG2antt.Layout = "multiplesort=\"C1:1\";collapse=\"0-9999\"" |
1707 |
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 2)
' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function Dim oG2antt as P Dim rs as P Dim var_Items as local oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Columns.Item(1).SortOrder = 1 oG2antt.EndUpdate() oG2antt.BeginUpdate() oG2antt.EnsureVisibleColumn(0) ' oG2antt.Items.ExpandItem(0) = .f. var_Items = oG2antt.Items oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ExpandItem(0) = False" oG2antt.EndUpdate() |
1706 |
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 1)
' Occurs after a new Group Item has been inserted to Items collection. function AddGroupItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as local oG2antt = topparent:CONTROL_ACTIVEX1.activex ' oG2antt.Items.ExpandItem(Item) = .f. var_Items = oG2antt.Items oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ExpandItem(Item) = False" end function ' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function Dim oG2antt as P Dim rs as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Columns.Item(1).SortOrder = 1 oG2antt.EndUpdate() |
1705 |
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)
' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function Dim oG2antt as P Dim rs as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Columns.Item(1).SortOrder = 1 oG2antt.EndUpdate() oG2antt.EnsureVisibleColumn(0) oG2antt.BeginUpdate() var_Items = oG2antt.Items ' var_Items.ExpandItem(var_Items.RootItem(0)) = .f. oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ExpandItem(RootItem(0)) = False" ' var_Items.ExpandItem(var_Items.RootItem(1)) = .f. oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ExpandItem(RootItem(1)) = False" ' var_Items.ExpandItem(var_Items.RootItem(2)) = .f. oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ExpandItem(RootItem(2)) = False" oG2antt.EndUpdate() |
1704 |
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)
' Occurs after a new Item has been inserted to Items collection. function AddItem as v (Item as OLE::Exontrol.G2antt.1::HITEM) Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex var_Items = oG2antt.Items var_Items.AddBar(Item,"Task",var_Items.CellValue(Item,2),var_Items.CellValue(Item,4)) end function Dim oG2antt as P Dim rs as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.Chart.FirstVisibleDate = {09/01/1994} oG2antt.BackColorSortBar = oG2antt.BackColor oG2antt.ColumnAutoResize = .f. rs = OLE.Create("ADOR.Recordset") rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3) oG2antt.DataSource = rs oG2antt.SortBarVisible = .t. oG2antt.SortBarCaption = "Drag a <b>column</b> header here to group by that column." oG2antt.AllowGroupBy = .t. oG2antt.Columns.Item(1).SortOrder = 1 oG2antt.EndUpdate() oG2antt.BeginUpdate() oG2antt.EnsureVisibleColumn(0) var_Items = oG2antt.Items ' var_Items.ExpandItem(var_Items.FirstVisibleItem) = .f. oG2antt.TemplateDef = "dim var_Items" oG2antt.TemplateDef = var_Items oG2antt.Template = "var_Items.ExpandItem(FirstVisibleItem) = False" oG2antt.EndUpdate() |
1703 |
How can I move automatically a bar once another is moved ( non-working bars )
Dim h as N Dim h1 as N Dim h2 as N Dim h3 as N Dim oG2antt as P Dim var_Bar as P Dim var_Chart as P Dim var_Column as local Dim var_Column1 as local Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.MarkSearchColumn = .f. oG2antt.OnResizeControl = 1 oG2antt.Columns.Add("Tasks") ' oG2antt.Columns.Add("Start").Visible = .f. var_Column = oG2antt.Columns.Add("Start") oG2antt.TemplateDef = "dim var_Column" oG2antt.TemplateDef = var_Column oG2antt.Template = "var_Column.Visible = False" ' oG2antt.Columns.Add("End").Visible = .f. var_Column1 = oG2antt.Columns.Add("End") oG2antt.TemplateDef = "dim var_Column1" oG2antt.TemplateDef = var_Column1 oG2antt.Template = "var_Column1.Visible = False" var_Chart = oG2antt.Chart var_Chart.FirstVisibleDate = {09/20/2006} ' var_Chart.PaneWidth(.f.) = 64 oG2antt.TemplateDef = "dim var_Chart" oG2antt.TemplateDef = var_Chart oG2antt.Template = "var_Chart.PaneWidth(0) = 64" var_Bar = var_Chart.Bars.Add("Task:Split") var_Bar.Shortcut = "TSplit" ' var_Bar.Def(20) = .t. oG2antt.TemplateDef = "dim var_Bar" oG2antt.TemplateDef = var_Bar oG2antt.Template = "var_Bar.Def(20) = True" var_Items = oG2antt.Items h = var_Items.AddItem("Project") ' var_Items.CellValue(h,1) = {09/22/2006} oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,1) = #9/22/2006#" ' var_Items.CellValue(h,2) = {10/03/2006} oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,2) = #10/3/2006#" var_Items.AddBar(h,"Summary",var_Items.CellValue(h,1),var_Items.CellValue(h,2)) h1 = var_Items.InsertItem(h,,"Task 1") ' var_Items.CellValue(h1,1) = var_Items.CellValue(h,1) oG2antt.TemplateDef = "dim var_Items,h1" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h1 oG2antt.Template = "var_Items.CellValue(h1,1) = CellValue(h,1)" ' var_Items.CellValue(h1,2) = {09/26/2006} oG2antt.TemplateDef = "dim var_Items,h1" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h1 oG2antt.Template = "var_Items.CellValue(h1,2) = #9/26/2006#" var_Items.AddBar(h1,"TSplit",var_Items.CellValue(h1,1),var_Items.CellValue(h1,2)) h2 = var_Items.InsertItem(h,,"Task 2") ' var_Items.CellValue(h2,1) = var_Items.CellValue(h1,2) oG2antt.TemplateDef = "dim var_Items,h2" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h2 oG2antt.Template = "var_Items.CellValue(h2,1) = CellValue(h1,2)" ' var_Items.CellValue(h2,2) = {09/28/2006} oG2antt.TemplateDef = "dim var_Items,h2" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h2 oG2antt.Template = "var_Items.CellValue(h2,2) = #9/28/2006#" var_Items.AddBar(h2,"TSplit",var_Items.CellValue(h2,1),var_Items.CellValue(h2,2)) var_Items.AddLink("L1",h1,"",h2,"") h3 = var_Items.InsertItem(h,,"Task 3") ' var_Items.CellValue(h3,1) = var_Items.CellValue(h2,2) oG2antt.TemplateDef = "dim var_Items,h3" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h3 oG2antt.Template = "var_Items.CellValue(h3,1) = CellValue(h2,2)" ' var_Items.CellValue(h3,2) = var_Items.CellValue(h,2) oG2antt.TemplateDef = "dim var_Items,h3" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h3 oG2antt.Template = "var_Items.CellValue(h3,2) = CellValue(h,2)" var_Items.AddBar(h3,"TSplit",var_Items.CellValue(h3,1),var_Items.CellValue(h3,2)) var_Items.AddLink("L2",h2,"",h3,"") var_Items.GroupBars(h1,"",.f.,h2,"",.t.,7) var_Items.GroupBars(h2,"",.f.,h3,"",.t.,7) var_Items.DefineSummaryBars(h,"",h1,"") var_Items.DefineSummaryBars(h,"",h2,"") var_Items.DefineSummaryBars(h,"",h3,"") ' var_Items.ExpandItem(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ExpandItem(h) = True" ' var_Items.ItemBold(h) = .t. oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.ItemBold(h) = True" oG2antt.EndUpdate() |
1702 |
How can I get notified once the user expands a column
' Occurs when column's position or column's size is changed. function LayoutChanged as v () oG2antt = topparent:CONTROL_ACTIVEX1.activex ? "Column-Expanded" ? oG2antt.Columns.Item("C0").Expanded end function Dim h as N Dim oG2antt as P Dim var_Column as P Dim var_Columns as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.ShowFocusRect = .f. oG2antt.ColumnAutoResize = .f. oG2antt.DrawGridLines = -1 oG2antt.BackColorLevelHeader = oG2antt.BackColor var_Columns = oG2antt.Columns var_Column = var_Columns.Add("C0") var_Column.ExpandColumns = "0,1,2" var_Column.DisplayExpandButton = .t. var_Columns.Add("C1") var_Columns.Add("C2") var_Items = oG2antt.Items h = var_Items.AddItem("Cell 0.0") ' var_Items.CellValue(h,1) = "Cell 0.1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,1) = `Cell 0.1`" ' var_Items.CellValue(h,2) = "Cell 0.2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,2) = `Cell 0.2`" h = var_Items.AddItem("Cell 1.0") ' var_Items.CellValue(h,1) = "Cell 1.1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,1) = `Cell 1.1`" ' var_Items.CellValue(h,2) = "Cell 1.2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,2) = `Cell 1.2`" oG2antt.EndUpdate() |
1701 |
I am using expandable headers, the question is how I can display the column itself, not just the child columns
Dim h as N Dim oG2antt as P Dim var_Column as P Dim var_Columns as P Dim var_Items as P oG2antt = topparent:CONTROL_ACTIVEX1.activex oG2antt.BeginUpdate() oG2antt.ColumnAutoResize = .f. oG2antt.DrawGridLines = -1 oG2antt.BackColorLevelHeader = oG2antt.BackColor var_Columns = oG2antt.Columns var_Column = var_Columns.Add("C0") var_Column.ExpandColumns = "0,1,2" var_Column.DisplayExpandButton = .t. var_Columns.Add("C1") var_Columns.Add("C2") var_Items = oG2antt.Items h = var_Items.AddItem("Cell 0.0") ' var_Items.CellValue(h,1) = "Cell 0.1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,1) = `Cell 0.1`" ' var_Items.CellValue(h,2) = "Cell 0.2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,2) = `Cell 0.2`" h = var_Items.AddItem("Cell 1.0") ' var_Items.CellValue(h,1) = "Cell 1.1" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,1) = `Cell 1.1`" ' var_Items.CellValue(h,2) = "Cell 1.2" oG2antt.TemplateDef = "dim var_Items,h" oG2antt.TemplateDef = var_Items oG2antt.TemplateDef = h oG2antt.Template = "var_Items.CellValue(h,2) = `Cell 1.2`" oG2antt.EndUpdate() |